WeightedProportion#

class causalpy.skl_models.WeightedProportion[source]#

Weighted proportion model for causal inference. Used for synthetic control methods for example

Methods

WeightedProportion.__init__()

WeightedProportion.calculate_cumulative_impact(impact)

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

WeightedProportion.get_coeffs()

Get the coefficients of the model as a numpy array.

WeightedProportion.get_metadata_routing()

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

WeightedProportion.predict(X)

Predict results for data X

WeightedProportion.print_coefficients(labels)

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)#