SchoolHolidayConfig#
- class openstef_models.transforms.time_domain.school_holiday_features_adder.SchoolHolidayConfig(*, country_code: CountryAlpha2, subdivision_code: str | None = None, years_ahead: int = 2, feature_name: str = 'is_school_holiday', one_hot_by_name: bool = False, regional_groups: bool = False, csv_path: Path | None = None)[source]
Bases:
BaseConfigOpt-in configuration for school holiday features.
Set on a workflow config to add school holiday features. Holidays are fetched once during fit, or read from csv_path, and then frozen in the model checkpoint so the feature set stays stable.
- Parameters:
- country_code: CountryAlpha2
- years_ahead: int
- feature_name: str
- one_hot_by_name: bool
- regional_groups: bool
- create_transform() SchoolHolidayFeatureAdder[source]
Create a new school holiday transform with this configuration.
- Return type:
SchoolHolidayFeatureAdder- Returns:
A fresh, unfitted SchoolHolidayFeatureAdder. Each workflow gets its own 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].