WeightedProportion#
- class causalpy.skl_models.WeightedProportion[source]#
Model which minimises sum squared error subject to:
All weights are bound between 0-1
Weights sum to 1.
Inspiration taken from this blog post https://towardsdatascience.com/understanding-synthetic-control-methods-dd9a291885a1
Methods
WeightedProportion.__init__(*args, **kwargs)WeightedProportion.fit(X, y)Fit model on data X with predictor y
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 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
scoremethod.- __init__(*args, **kwargs)#
- __new__(*args, **kwargs)#