make_model_adapter#
- causalpy.experiments.model_adapter.make_model_adapter(model, *, default_model_class, supports_bayes, supports_ols)[source]#
Resolve, validate, and wrap a model in a backend adapter.
- Parameters:
model (
PyMCModel|RegressorMixin|None) – User-supplied model instance, orNoneto use the default.default_model_class (
type[PyMCModel] |None) – PyMC model class used whenmodelisNone.supports_bayes (
bool) – Whether the experiment supports Bayesian backends.supports_ols (
bool) – Whether the experiment supports OLS/sklearn backends.
- Returns:
Backend-specific adapter wrapping the resolved model.
- Return type: