GBLinearHyperParams#

class openstef_models.models.forecasting.gblinear_forecaster.GBLinearHyperParams(**data: Any) None[source]

Bases: HyperParams

Hyperparameter configuration for GBLinear forecaster.

Parameters:

data (Any)

n_steps: Annotated[int, IntRange(low=50, high=1000, log=False, tune=False)]
updater: Annotated[str, CategoricalRange(choices='shotgun', 'coord_descent', tune=False)]
learning_rate: Annotated[float, FloatRange(low=0.01, high=0.5, log=True, tune=False)]
objective: ObjectiveFunctionType | Literal['reg:quantileerror']
evaluation_metric: EvaluationFunctionType
reg_alpha: Annotated[float, FloatRange(low=1e-08, high=1.0, log=True, tune=False)]
reg_lambda: Annotated[float, FloatRange(low=1e-08, high=1.0, log=True, tune=False)]
feature_selector: Annotated[str, CategoricalRange(choices='cyclic', 'shuffle', 'random', 'greedy', 'thrifty', tune=False)]
top_k: int
random_state: int | None
early_stopping_rounds: int | None
classmethod forecaster_class() type[GBLinearForecaster][source]

Forecaster class for these hyperparams.

Return type:

type[GBLinearForecaster]

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 initialize 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