PyMCModelAdapter#

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

Adapter for PyMCModel backends.

Parameters:

model (PyMCModel) – Fitted or unfitted PyMC backend model.

Methods

PyMCModelAdapter.coefficients()

Return posterior mean coefficients.

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

Fit the PyMC model.

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

Predict using the PyMC model.

PyMCModelAdapter.print_coefficients(labels)

Print PyMC model coefficients.

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

Score predictions from the PyMC model.

Attributes

idata

Return the model's InferenceData object.

is_bayesian

Whether the backend is Bayesian (PyMC).

is_ols

Whether the backend is OLS/sklearn.

kind

Backend identifier.

model

The underlying PyMC model.

__init__(model)[source]#
Parameters:

model (PyMCModel)

Return type:

None

classmethod __new__(*args, **kwargs)#