ModelAdapter#

class causalpy.experiments.model_adapter.ModelAdapter[source]#

Experiment-agnostic wrapper around a CausalPy statistical backend.

Methods

ModelAdapter.coefficients()

Return point estimates of model coefficients.

ModelAdapter.fit(X, y, *[, coords])

Fit the model with backend-appropriate conventions.

ModelAdapter.predict(X, *[, out_of_sample])

Predict with backend-appropriate conventions.

ModelAdapter.print_coefficients(labels[, ...])

Print model coefficients with labels.

ModelAdapter.score(X, y, **kwargs)

Score predictions against observed outcomes.

Attributes

idata

Return InferenceData for Bayesian models.

is_bayesian

Whether the backend is Bayesian (PyMC).

is_ols

Whether the backend is OLS/sklearn.

kind

Backend identifier.

model

The underlying model instance.

__init__()#
classmethod __new__(*args, **kwargs)#