WeightedProportion#
- class causalpy.skl_models.WeightedProportion[source]#
Weighted proportion model for causal inference.
Used for synthetic control methods, for example.
Methods
Calculate the cumulative impact intervention.
WeightedProportion.calculate_impact(y_true, ...)Calculate the causal impact of the intervention.
WeightedProportion.fit(X, y)Fit model on data X with predictor y.
Get the coefficients of the model as a numpy array.
Get metadata routing of this object.
WeightedProportion.get_params([deep])Get parameters for this estimator.
WeightedProportion.loss(W, X, y)Compute root mean squared loss with data X, weights W, and predictor y.
Predict results for data X.
Print the coefficients of the model with the corresponding labels.
WeightedProportion.score(X, y[, sample_weight])Return coefficient of determination on test data.
WeightedProportion.set_params(**params)Set the parameters of this estimator.
WeightedProportion.set_score_request(*[, ...])Configure whether metadata should be requested to be passed to the
scoremethod.Attributes
coef_- __init__()#
- classmethod __new__(*args, **kwargs)#