LGBMLinearHyperParams#

class openstef_models.models.forecasting.lgbmlinear_forecaster.LGBMLinearHyperParams(**data: Any) None[source]

Bases: HyperParams

LGBMLinear hyperparameters for gradient boosting tree models with linear leaves.

Example

Creating custom hyperparameters for deep trees with regularization

>>> hyperparams = LGBMLinearHyperParams(
...     n_estimators=200,
...     max_depth=8,
...     learning_rate=0.1,
...     reg_alpha=0.1,
...     reg_lambda=1.0,
... )

Note

These parameters are optimized for probabilistic forecasting with quantile regression. The default objective function is specialized for magnitude-weighted pinball loss.

Parameters:

data (Any)

n_estimators: int
learning_rate: float
max_depth: int
min_child_weight: float
min_data_in_leaf: int
min_data_in_bin: int
reg_alpha: float
reg_lambda: float
num_leaves: int
max_bin: int
colsample_bytree: float
classmethod forecaster_class() type[LGBMLinearForecaster][source]

Get forecaster class for these hyperparams.

Return type:

type[LGBMLinearForecaster]

Returns:

Forecaster class associated with this configuration.

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