Synapseml  1.0.4
Public Member Functions | Static Public Member Functions | List of all members
Synapse.ML.Causal.SyntheticDiffInDiffEstimator Class Reference

SyntheticDiffInDiffEstimator implements SyntheticDiffInDiffEstimator More...

Inheritance diagram for Synapse.ML.Causal.SyntheticDiffInDiffEstimator:
Inheritance graph
[legend]
Collaboration diagram for Synapse.ML.Causal.SyntheticDiffInDiffEstimator:
Collaboration graph
[legend]

Public Member Functions

 SyntheticDiffInDiffEstimator ()
 Creates a SyntheticDiffInDiffEstimator without any parameters. More...
 
 SyntheticDiffInDiffEstimator (string uid)
 Creates a SyntheticDiffInDiffEstimator with a UID that is used to give the SyntheticDiffInDiffEstimator a unique ID. More...
 
SyntheticDiffInDiffEstimator SetEpsilon (double value)
 Sets value for epsilon More...
 
SyntheticDiffInDiffEstimator SetHandleMissingOutcome (string value)
 Sets value for handleMissingOutcome More...
 
SyntheticDiffInDiffEstimator SetLocalSolverThreshold (long value)
 Sets value for localSolverThreshold More...
 
SyntheticDiffInDiffEstimator SetMaxIter (int value)
 Sets value for maxIter More...
 
SyntheticDiffInDiffEstimator SetNumIterNoChange (int value)
 Sets value for numIterNoChange More...
 
SyntheticDiffInDiffEstimator SetOutcomeCol (string value)
 Sets value for outcomeCol More...
 
SyntheticDiffInDiffEstimator SetPostTreatmentCol (string value)
 Sets value for postTreatmentCol More...
 
SyntheticDiffInDiffEstimator SetStepSize (double value)
 Sets value for stepSize More...
 
SyntheticDiffInDiffEstimator SetTimeCol (string value)
 Sets value for timeCol More...
 
SyntheticDiffInDiffEstimator SetTol (double value)
 Sets value for tol More...
 
SyntheticDiffInDiffEstimator SetTreatmentCol (string value)
 Sets value for treatmentCol More...
 
SyntheticDiffInDiffEstimator SetUnitCol (string value)
 Sets value for unitCol More...
 
SyntheticDiffInDiffEstimator SetZeta (double value)
 Sets value for zeta More...
 
double GetEpsilon ()
 Gets epsilon value More...
 
string GetHandleMissingOutcome ()
 Gets handleMissingOutcome value More...
 
long GetLocalSolverThreshold ()
 Gets localSolverThreshold value More...
 
int GetMaxIter ()
 Gets maxIter value More...
 
int GetNumIterNoChange ()
 Gets numIterNoChange value More...
 
string GetOutcomeCol ()
 Gets outcomeCol value More...
 
string GetPostTreatmentCol ()
 Gets postTreatmentCol value More...
 
double GetStepSize ()
 Gets stepSize value More...
 
string GetTimeCol ()
 Gets timeCol value More...
 
double GetTol ()
 Gets tol value More...
 
string GetTreatmentCol ()
 Gets treatmentCol value More...
 
string GetUnitCol ()
 Gets unitCol value More...
 
double GetZeta ()
 Gets zeta value More...
 
override DiffInDiffModel Fit (DataFrame dataset)
 Fits a model to the input data. More...
 
void Save (string path)
 Saves the object so that it can be loaded later using Load. Note that these objects can be shared with Scala by Loading or Saving in Scala. More...
 
JavaMLWriter Write ()
 
Returns
a JavaMLWriter instance for this ML instance.

 
JavaMLReader< SyntheticDiffInDiffEstimatorRead ()
 Get the corresponding JavaMLReader instance. More...
 

Static Public Member Functions

static SyntheticDiffInDiffEstimator Load (string path)
 Loads the SyntheticDiffInDiffEstimator that was previously saved using Save(string). More...
 

Detailed Description

SyntheticDiffInDiffEstimator implements SyntheticDiffInDiffEstimator

Constructor & Destructor Documentation

◆ SyntheticDiffInDiffEstimator() [1/2]

Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SyntheticDiffInDiffEstimator ( )
inline

Creates a SyntheticDiffInDiffEstimator without any parameters.

◆ SyntheticDiffInDiffEstimator() [2/2]

Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SyntheticDiffInDiffEstimator ( string  uid)
inline

Creates a SyntheticDiffInDiffEstimator with a UID that is used to give the SyntheticDiffInDiffEstimator a unique ID.

Parameters
uidAn immutable unique ID for the object and its derivatives.

Member Function Documentation

◆ Fit()

override DiffInDiffModel Synapse.ML.Causal.SyntheticDiffInDiffEstimator.Fit ( DataFrame  dataset)

Fits a model to the input data.

Parameters
datasetThe DataFrame to fit the model to.
Returns
DiffInDiffModel

◆ GetEpsilon()

double Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetEpsilon ( )

Gets epsilon value

Returns
epsilon: This value is added to the weights when we fit the final linear model for SyntheticControlEstimator and SyntheticDiffInDiffEstimator in order to avoid zero weights.

◆ GetHandleMissingOutcome()

string Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetHandleMissingOutcome ( )

Gets handleMissingOutcome value

Returns
handleMissingOutcome: How to handle missing outcomes. Options are skip (which will filter out units with missing outcomes), zero (fill in missing outcomes with zero), or impute (impute with nearest available outcomes, or mean if two nearest outcomes are available)

◆ GetLocalSolverThreshold()

long Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetLocalSolverThreshold ( )

Gets localSolverThreshold value

Returns
localSolverThreshold: threshold for using local solver on driver node. Local solver is faster but relies on part of data being collected on driver node.

◆ GetMaxIter()

int Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetMaxIter ( )

Gets maxIter value

Returns
maxIter: maximum number of iterations (>= 0)

◆ GetNumIterNoChange()

int Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetNumIterNoChange ( )

Gets numIterNoChange value

Returns
numIterNoChange: Early termination when number of iterations without change reached.

◆ GetOutcomeCol()

string Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetOutcomeCol ( )

Gets outcomeCol value

Returns
outcomeCol: outcome column

◆ GetPostTreatmentCol()

string Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetPostTreatmentCol ( )

Gets postTreatmentCol value

Returns
postTreatmentCol: post treatment indicator column

◆ GetStepSize()

double Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetStepSize ( )

Gets stepSize value

Returns
stepSize: Step size to be used for each iteration of optimization (> 0)

◆ GetTimeCol()

string Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetTimeCol ( )

Gets timeCol value

Returns
timeCol: Specify the column that identifies the time when outcome is measured in the panel data. For example, if the outcome is measured daily, this column could be the Date column.

◆ GetTol()

double Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetTol ( )

Gets tol value

Returns
tol: the convergence tolerance for iterative algorithms (>= 0)

◆ GetTreatmentCol()

string Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetTreatmentCol ( )

Gets treatmentCol value

Returns
treatmentCol: treatment column

◆ GetUnitCol()

string Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetUnitCol ( )

Gets unitCol value

Returns
unitCol: Specify the name of the column which contains an identifier for each observed unit in the panel data. For example, if the observed units are users, this column could be the UserId column.

◆ GetZeta()

double Synapse.ML.Causal.SyntheticDiffInDiffEstimator.GetZeta ( )

Gets zeta value

Returns
zeta: The zeta value for regularization term when fitting unit weights. If not specified, a default value will be computed based on formula (2.2) specified in https://www.nber.org/system/files/working_papers/w25532/w25532.pdf. For large scale data, one may want to tune the zeta value, minimizing the loss of the unit weights regression.

◆ Load()

static SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.Load ( string  path)
static

Loads the SyntheticDiffInDiffEstimator that was previously saved using Save(string).

Parameters
pathThe path the previous SyntheticDiffInDiffEstimator was saved to
Returns
New SyntheticDiffInDiffEstimator object, loaded from path.

◆ Read()

JavaMLReader<SyntheticDiffInDiffEstimator> Synapse.ML.Causal.SyntheticDiffInDiffEstimator.Read ( )

Get the corresponding JavaMLReader instance.

Returns
an JavaMLReader<SyntheticDiffInDiffEstimator> instance for this ML instance.

◆ Save()

void Synapse.ML.Causal.SyntheticDiffInDiffEstimator.Save ( string  path)

Saves the object so that it can be loaded later using Load. Note that these objects can be shared with Scala by Loading or Saving in Scala.

Parameters
pathThe path to save the object to

◆ SetEpsilon()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetEpsilon ( double  value)

Sets value for epsilon

Parameters
valueThis value is added to the weights when we fit the final linear model for SyntheticControlEstimator and SyntheticDiffInDiffEstimator in order to avoid zero weights.
Returns
New SyntheticDiffInDiffEstimator object

◆ SetHandleMissingOutcome()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetHandleMissingOutcome ( string  value)

Sets value for handleMissingOutcome

Parameters
valueHow to handle missing outcomes. Options are skip (which will filter out units with missing outcomes), zero (fill in missing outcomes with zero), or impute (impute with nearest available outcomes, or mean if two nearest outcomes are available)
Returns
New SyntheticDiffInDiffEstimator object

◆ SetLocalSolverThreshold()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetLocalSolverThreshold ( long  value)

Sets value for localSolverThreshold

Parameters
valuethreshold for using local solver on driver node. Local solver is faster but relies on part of data being collected on driver node.
Returns
New SyntheticDiffInDiffEstimator object

◆ SetMaxIter()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetMaxIter ( int  value)

Sets value for maxIter

Parameters
valuemaximum number of iterations (>= 0)
Returns
New SyntheticDiffInDiffEstimator object

◆ SetNumIterNoChange()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetNumIterNoChange ( int  value)

Sets value for numIterNoChange

Parameters
valueEarly termination when number of iterations without change reached.
Returns
New SyntheticDiffInDiffEstimator object

◆ SetOutcomeCol()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetOutcomeCol ( string  value)

Sets value for outcomeCol

Parameters
valueoutcome column
Returns
New SyntheticDiffInDiffEstimator object

◆ SetPostTreatmentCol()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetPostTreatmentCol ( string  value)

Sets value for postTreatmentCol

Parameters
valuepost treatment indicator column
Returns
New SyntheticDiffInDiffEstimator object

◆ SetStepSize()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetStepSize ( double  value)

Sets value for stepSize

Parameters
valueStep size to be used for each iteration of optimization (> 0)
Returns
New SyntheticDiffInDiffEstimator object

◆ SetTimeCol()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetTimeCol ( string  value)

Sets value for timeCol

Parameters
valueSpecify the column that identifies the time when outcome is measured in the panel data. For example, if the outcome is measured daily, this column could be the Date column.
Returns
New SyntheticDiffInDiffEstimator object

◆ SetTol()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetTol ( double  value)

Sets value for tol

Parameters
valuethe convergence tolerance for iterative algorithms (>= 0)
Returns
New SyntheticDiffInDiffEstimator object

◆ SetTreatmentCol()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetTreatmentCol ( string  value)

Sets value for treatmentCol

Parameters
valuetreatment column
Returns
New SyntheticDiffInDiffEstimator object

◆ SetUnitCol()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetUnitCol ( string  value)

Sets value for unitCol

Parameters
valueSpecify the name of the column which contains an identifier for each observed unit in the panel data. For example, if the observed units are users, this column could be the UserId column.
Returns
New SyntheticDiffInDiffEstimator object

◆ SetZeta()

SyntheticDiffInDiffEstimator Synapse.ML.Causal.SyntheticDiffInDiffEstimator.SetZeta ( double  value)

Sets value for zeta

Parameters
valueThe zeta value for regularization term when fitting unit weights. If not specified, a default value will be computed based on formula (2.2) specified in https://www.nber.org/system/files/working_papers/w25532/w25532.pdf. For large scale data, one may want to tune the zeta value, minimizing the loss of the unit weights regression.
Returns
New SyntheticDiffInDiffEstimator object

The documentation for this class was generated from the following file: