SklearnModelAdapter#
- class causalpy.experiments.model_adapter.SklearnModelAdapter[source]#
Adapter for sklearn
RegressorMixinbackends.- Parameters:
model (
RegressorMixin) – CausalPy-compatible sklearn backend model.
Methods
Return fitted sklearn coefficients.
SklearnModelAdapter.fit(X, y, *[, coords])Fit the sklearn model.
SklearnModelAdapter.predict(X, *[, ...])Return point predictions as singleton posterior draws.
Print sklearn model coefficients.
Return fitted
InferenceDataor raise an explicit capability error.SklearnModelAdapter.score(X, y, **kwargs)Return per-output \(R^2\) scores from the sklearn model.
Attributes
idataReturn
Nonebecause sklearn models have noInferenceData.is_bayesianWhether the backend is Bayesian (PyMC or pymc-forecast).
is_olsWhether the backend is OLS/sklearn.
kindBackend identifier.
modelThe underlying sklearn model.
supports_idataWhether the backend can expose ArviZ
InferenceData.- __init__(model)[source]#
- Parameters:
model (RegressorMixin)
- Return type:
None
- classmethod __new__(*args, **kwargs)#