ConditionalRegressionMixin
- class pyoptex.analysis.mixins.conditional_mixin.ConditionalRegressionMixin(*args, conditional=False, **kwargs)[source]
Mixin to provide additional capabilities of fitting a conditional model or not. Should be used as
>>> class MyRegressor(ConditionalRegressionMixin, RegressionMixin): >>> ...
See
RegressionMixinfor more information.The conditional model removes any random effects and models them as categorical fixed effects. These categorical effects are effect encoded.
Attributes
- conditionalbool
Whether to fit a conditional model or not.
- __init__(*args, conditional=False, **kwargs)[source]
Initializes the mixin.
Parameters
- conditionalbool
Whether to create a conditional model or not.
Methods
ConditionalRegressionMixin.formula([labels])Creates the prediction formula of the fit for the encoded and normalized data.
Creates the prediction formula of the fit for the encoded and normalized data.