WeightedProportion#
- class causalpy.skl_models.WeightedProportion[source]#
Weighted proportion model for causal inference.
Used for synthetic control methods, for example.
Methods
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.
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)#