LogisticCombinerHyperParams#

class openstef_meta.models.forecast_combiners.LogisticCombinerHyperParams(**data: Any) None[source]

Bases: HyperParams

Hyperparameters for the logistic regression classifier.

Parameters:

data (Any)

fit_intercept: bool
penalty: Literal['l1', 'l2', 'elasticnet']
c: float
get_classifier() ClassifierMixin[source]

Create a logistic regression classifier from these hyperparameters.

Return type:

ClassifierMixin

Returns:

Configured LogisticRegression instance.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

  • self

  • context

Return type:

None