actableai.models.causal_inference_estimators package

Submodules

actableai.models.causal_inference_estimators.base module

class actableai.models.causal_inference_estimators.base.DMLModel(value)

Bases: str, enum.Enum

Enum representing the different DML models available.

CausalForestDML = 'CausalForestDML'
KernelDML = 'KernelDML'
LinearDML = 'LinearDML'
SparseLinearDML = 'SparseLinearDML'
class actableai.models.causal_inference_estimators.base.DistanceMatchingModel(value)

Bases: str, enum.Enum

Enum representing the different Distance Matching models available.

DistanceMatching = 'DistanceMatching'
class actableai.models.causal_inference_estimators.base.EstimatorBaseParams(parameters: Optional[Dict[str, Any]] = None, process_parameters: bool = True, discrete_treatment: bool = False, random_state: Optional[int] = None)

Bases: actableai.models.base.AAIParametersModel

Base class for Estimator Model Parameters.

estimate_effect(treatments: List, causal_model: CausalModel, target_units: str = 'ate', controls: Optional[List] = None, non_controls: Optional[List] = None)

Estimate the causal effect.

Parameters
  • treatments – treatment variable(s)
  • causal_model – The causal model
  • target_units – Targeted used for calculating the effect. Possible values are “ate”, “att”, “atc”. Defaults to “ate”.
  • controls – Dictionary of control treatment values. Keys are categorical treatment names.
  • non_controls – Dictionary of values which are not used as controls. Keys are categorical treatment names.
estimator_type = None
abstract static get_parameters() actableai.parameters.parameters.Parameters

Returns the parameters of the model.

Returns
The parameters.
has_explanations: bool = False
has_fit: bool = True
has_predict: bool = False
has_transform: bool = False
initialize_model(model_y: Union[str, Type[TabularPredictor]], model_t: Union[str, Type[TabularPredictor]])
Build an estimator from the underlying model using selected
parameters. Mostly intended for Double ML estimators.
Parameters
  • model_y – The estimator for fitting the response to the features. Must implement fit and predict methods.
  • model_t – The estimator for fitting the treatment to the features. If estimator, it must implement fit and predict methods.
method_name = None
class actableai.models.causal_inference_estimators.base.Model(value)

Bases: str, enum.Enum

Enum representing the different models available.

CausalForestDML = 'CausalForestDML'
DistanceMatching = 'DistanceMatching'
KernelDML = 'KernelDML'
LinearDML = 'LinearDML'
PropensityScoreWeighting = 'PropensityScoreWeighting'
SparseLinearDML = 'SparseLinearDML'
class actableai.models.causal_inference_estimators.base.PropensityScoreWeightingModel(value)

Bases: str, enum.Enum

Enum representing the different Propensity Score Weighting models available.

PropensityScoreWeighting = 'PropensityScoreWeighting'

actableai.models.causal_inference_estimators.causal_forest_dml module

class actableai.models.causal_inference_estimators.causal_forest_dml.CausalForestDMLParams(parameters: Optional[Dict[str, Any]] = None, process_parameters: bool = True, discrete_treatment: bool = False, random_state: Optional[int] = None)

Bases: actableai.models.causal_inference_estimators.base.EstimatorBaseParams

Parameter class for Causal Forest DML Model.

estimator_type = 'dml'
static get_parameters(cv, mc_iters, **kwargs) actableai.parameters.parameters.Parameters

Returns the parameters space of the model.

Parameters
  • cv – Number of cross validation folds
  • mc_iters – The number of times to rerun the first stage models to reduce the variance of the nuisances.
Returns

The parameters space.

actableai.models.causal_inference_estimators.distance_matching module

class actableai.models.causal_inference_estimators.distance_matching.DistanceMatchingParams(parameters: Optional[Dict[str, Any]] = None, process_parameters: bool = True, discrete_treatment: bool = False, random_state: Optional[int] = None)

Bases: actableai.models.causal_inference_estimators.base.EstimatorBaseParams

Parameter class for Distance Matching estimator.

estimator_type = 'matching'
static get_parameters(**kwargs) actableai.parameters.parameters.Parameters

Returns the parameters space of the model.

Returns
The parameters space.
method_name = 'backdoor.distance_matching'

actableai.models.causal_inference_estimators.kernel_dml module

class actableai.models.causal_inference_estimators.kernel_dml.KernelDMLParams(parameters: Optional[Dict[str, Any]] = None, process_parameters: bool = True, discrete_treatment: bool = False, random_state: Optional[int] = None)

Bases: actableai.models.causal_inference_estimators.base.EstimatorBaseParams

Parameter class for Kernel DML Model.

estimator_type = 'dml'
static get_parameters(cv, mc_iters, **kwargs) actableai.parameters.parameters.Parameters

Returns the parameters space of the model.

Parameters
  • cv – Number of cross validation folds
  • mc_iters – The number of times to rerun the first stage models to reduce the variance of the nuisances.
Returns

The parameters space.

actableai.models.causal_inference_estimators.linear_dml module

class actableai.models.causal_inference_estimators.linear_dml.LinearDMLParams(parameters: Optional[Dict[str, Any]] = None, process_parameters: bool = True, discrete_treatment: bool = False, random_state: Optional[int] = None)

Bases: actableai.models.causal_inference_estimators.base.EstimatorBaseParams

Parameter class for Linear DML Model.

estimator_type = 'dml'
static get_parameters(cv, mc_iters, **kwargs) actableai.parameters.parameters.Parameters

Returns the parameters space of the model.

Parameters
  • cv – Number of cross validation folds
  • mc_iters – The number of times to rerun the first stage models to reduce the variance of the nuisances.
Returns

The parameters space.

actableai.models.causal_inference_estimators.propensity_score_weighting module

class actableai.models.causal_inference_estimators.propensity_score_weighting.PropensityScoreWeightingParams(parameters: Optional[Dict[str, Any]] = None, process_parameters: bool = True, discrete_treatment: bool = False, random_state: Optional[int] = None)

Bases: actableai.models.causal_inference_estimators.base.EstimatorBaseParams

Parameter class for Propensity Score Weighting estimator.

estimator_type = 'propensity'
static get_parameters(**kwargs) actableai.parameters.parameters.Parameters

Returns the parameters space of the model.

Returns
The parameters space.
method_name = 'backdoor.propensity_score_weighting'

actableai.models.causal_inference_estimators.sparse_linear_dml module

class actableai.models.causal_inference_estimators.sparse_linear_dml.SparseLinearDMLParams(parameters: Optional[Dict[str, Any]] = None, process_parameters: bool = True, discrete_treatment: bool = False, random_state: Optional[int] = None)

Bases: actableai.models.causal_inference_estimators.base.EstimatorBaseParams

Parameter class for Sparse Linear DML Model.

estimator_type = 'dml'
static get_parameters(cv, mc_iters, **kwargs) actableai.parameters.parameters.Parameters

Returns the parameters space of the model.

Parameters
  • cv – Number of cross validation folds
  • mc_iters – The number of times to rerun the first stage models to reduce the variance of the nuisances.
Returns

The parameters space.

Module contents