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 the coefficient of determination of the prediction.
WeightedProportion.set_params
(**params)Set the parameters of this estimator.
WeightedProportion.set_score_request
(*[, ...])Request metadata passed to the
score
method.- __init__()#
- __new__(**kwargs)#