openstef package¶
Subpackages¶
- openstef.data_classes package
- Submodules
- openstef.data_classes.data_prep module
- openstef.data_classes.model_specifications module
- openstef.data_classes.prediction_job module
PredictionJobDataClass
PredictionJobDataClass.Config
PredictionJobDataClass.alternative_forecast_model_pid
PredictionJobDataClass.backtest_split_func
PredictionJobDataClass.completeness_threshold
PredictionJobDataClass.data_balancing_ratio
PredictionJobDataClass.data_prep_class
PredictionJobDataClass.default_modelspecs
PredictionJobDataClass.depends_on
PredictionJobDataClass.description
PredictionJobDataClass.electricity_bidding_zone
PredictionJobDataClass.flatliner_threshold_minutes
PredictionJobDataClass.forecast_type
PredictionJobDataClass.get()
PredictionJobDataClass.horizon_minutes
PredictionJobDataClass.hub_height
PredictionJobDataClass.id
PredictionJobDataClass.lat
PredictionJobDataClass.lon
PredictionJobDataClass.minimal_table_length
PredictionJobDataClass.model
PredictionJobDataClass.model_kwargs
PredictionJobDataClass.n_turbines
PredictionJobDataClass.name
PredictionJobDataClass.pipelines_to_run
PredictionJobDataClass.quantiles
PredictionJobDataClass.resolution_minutes
PredictionJobDataClass.save_train_forecasts
PredictionJobDataClass.sid
PredictionJobDataClass.train_components
PredictionJobDataClass.train_horizons_minutes
PredictionJobDataClass.train_split_func
PredictionJobDataClass.turbine_type
- openstef.data_classes.split_function module
- Module contents
- openstef.feature_engineering package
- Submodules
- openstef.feature_engineering.apply_features module
- openstef.feature_engineering.bidding_zone_to_country_mapping module
- openstef.feature_engineering.cyclic_features module
- openstef.feature_engineering.data_preparation module
- openstef.feature_engineering.feature_adder module
- openstef.feature_engineering.feature_applicator module
- openstef.feature_engineering.general module
- openstef.feature_engineering.holiday_features module
- openstef.feature_engineering.lag_features module
- openstef.feature_engineering.missing_values_transformer module
- openstef.feature_engineering.weather_features module
- Module contents
- openstef.metrics package
- openstef.model package
- Subpackages
- openstef.model.metamodels package
- openstef.model.regressors package
- Submodules
- openstef.model.regressors.arima module
- openstef.model.regressors.custom_regressor module
- openstef.model.regressors.dazls module
- openstef.model.regressors.flatliner module
- openstef.model.regressors.lgbm module
- openstef.model.regressors.linear module
- openstef.model.regressors.linear_quantile module
- openstef.model.regressors.regressor module
- openstef.model.regressors.xgb module
- openstef.model.regressors.xgb_multioutput_quantile module
- openstef.model.regressors.xgb_quantile module
- Module contents
- Submodules
- openstef.model.basecase module
- openstef.model.confidence_interval_applicator module
- openstef.model.fallback module
- openstef.model.model_creator module
- openstef.model.objective module
- openstef.model.objective_creator module
- openstef.model.serializer module
- openstef.model.standard_deviation_generator module
- Module contents
- Subpackages
- openstef.model_selection package
- openstef.monitoring package
- openstef.pipeline package
- Submodules
- openstef.pipeline.create_basecase_forecast module
- openstef.pipeline.create_component_forecast module
- openstef.pipeline.create_forecast module
- openstef.pipeline.optimize_hyperparameters module
- openstef.pipeline.train_create_forecast_backtest module
- openstef.pipeline.train_model module
- openstef.pipeline.utils module
- Module contents
- openstef.postprocessing package
- openstef.preprocessing package
- openstef.tasks package
- Subpackages
- Submodules
- openstef.tasks.calculate_kpi module
- openstef.tasks.create_basecase_forecast module
- openstef.tasks.create_components_forecast module
- openstef.tasks.create_forecast module
- openstef.tasks.create_solar_forecast module
- openstef.tasks.create_wind_forecast module
- openstef.tasks.optimize_hyperparameters module
- openstef.tasks.split_forecast module
- openstef.tasks.train_model module
- Module contents
- openstef.validation package
Submodules¶
openstef.app_settings module¶
- class openstef.app_settings.AppSettings(_case_sensitive=None, _nested_model_default_partial_update=None, _env_prefix=None, _env_file=PosixPath('.'), _env_file_encoding=None, _env_ignore_empty=None, _env_nested_delimiter=None, _env_parse_none_str=None, _env_parse_enums=None, _cli_prog_name=None, _cli_parse_args=None, _cli_settings_source=None, _cli_parse_none_str=None, _cli_hide_none_type=None, _cli_avoid_json=None, _cli_enforce_required=None, _cli_use_class_docs_for_groups=None, _cli_exit_on_error=None, _cli_prefix=None, _cli_flag_prefix_char=None, _cli_implicit_flags=None, _cli_ignore_unknown_args=None, _cli_kebab_case=None, _secrets_dir=None, **values)¶
Bases:
BaseSettings
Global app settings.
- log_level: str¶
- model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_kebab_case': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_use_class_docs_for_groups': False, 'enable_decoding': True, 'env_file': '.env', 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': 'openstef_', 'extra': 'ignore', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'protected_namespaces': ('model_validate', 'model_dump', 'settings_customise_sources'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- post_teams_messages: bool¶
openstef.enums module¶
- class openstef.enums.BiddingZone(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- AL = 'AL'¶
- AT = 'AT'¶
- BA = 'BA'¶
- BE = 'BE'¶
- BG = 'BG'¶
- BY = 'BY'¶
- CH = 'CH'¶
- CWE = 'CWE'¶
- CY = 'CY'¶
- CZ = 'CZ'¶
- CZ_DE_SK = 'CZ_DE_SK'¶
- DE = 'DE'¶
- DE_50HZ = 'DE_50HZ'¶
- DE_AMPRION = 'DE_AMPRION'¶
- DE_AMP_LU = 'DE_AMP_LU'¶
- DE_AT_LU = 'DE_AT_LU'¶
- DE_LU = 'DE_LU'¶
- DE_TENNET = 'DE_TENNET'¶
- DE_TRANSNET = 'DE_TRANSNET'¶
- DK = 'DK'¶
- DK_1 = 'DK_1'¶
- DK_1_NO_1 = 'DK_1_NO_1'¶
- DK_2 = 'DK_2'¶
- DK_CA = 'DK_CA'¶
- EE = 'EE'¶
- ES = 'ES'¶
- FI = 'FI'¶
- FR = 'FR'¶
- GB = 'GB'¶
- GB_ELECLINK = 'GB_ELECLINK'¶
- GB_IFA = 'GB_IFA'¶
- GB_IFA2 = 'GB_IFA2'¶
- GB_NIR = 'GB_NIR'¶
- GE = 'GE'¶
- GR = 'GR'¶
- HR = 'HR'¶
- HU = 'HU'¶
- IE = 'IE'¶
- IE_SEM = 'IE_SEM'¶
- IS = 'IS'¶
- IT = 'IT'¶
- IT_BRNN = 'IT_BRNN'¶
- IT_CALA = 'IT_CALA'¶
- IT_CNOR = 'IT_CNOR'¶
- IT_CSUD = 'IT_CSUD'¶
- IT_FOGN = 'IT_FOGN'¶
- IT_GR = 'IT_GR'¶
- IT_MACRO_NORTH = 'IT_MACRO_NORTH'¶
- IT_MACRO_SOUTH = 'IT_MACRO_SOUTH'¶
- IT_MALTA = 'IT_MALTA'¶
- IT_NORD = 'IT_NORD'¶
- IT_NORD_AT = 'IT_NORD_AT'¶
- IT_NORD_CH = 'IT_NORD_CH'¶
- IT_NORD_FR = 'IT_NORD_FR'¶
- IT_NORD_SI = 'IT_NORD_SI'¶
- IT_PRGP = 'IT_PRGP'¶
- IT_ROSN = 'IT_ROSN'¶
- IT_SACO_AC = 'IT_SACO_AC'¶
- IT_SACO_DC = 'IT_SACO_DC'¶
- IT_SARD = 'IT_SARD'¶
- IT_SICI = 'IT_SICI'¶
- IT_SUD = 'IT_SUD'¶
- LT = 'LT'¶
- LU = 'LU'¶
- LU_BZN = 'LU_BZN'¶
- LV = 'LV'¶
- MD = 'MD'¶
- ME = 'ME'¶
- MK = 'MK'¶
- MT = 'MT'¶
- NL = 'NL'¶
- NO = 'NO'¶
- NO_1 = 'NO_1'¶
- NO_1A = 'NO_1A'¶
- NO_2 = 'NO_2'¶
- NO_2A = 'NO_2A'¶
- NO_2_NSL = 'NO_2_NSL'¶
- NO_3 = 'NO_3'¶
- NO_4 = 'NO_4'¶
- NO_5 = 'NO_5'¶
- PL = 'PL'¶
- PL_CZ = 'PL_CZ'¶
- PT = 'PT'¶
- RO = 'RO'¶
- RS = 'RS'¶
- RU = 'RU'¶
- RU_KGD = 'RU_KGD'¶
- SE = 'SE'¶
- SE_1 = 'SE_1'¶
- SE_2 = 'SE_2'¶
- SE_3 = 'SE_3'¶
- SE_4 = 'SE_4'¶
- SI = 'SI'¶
- SK = 'SK'¶
- TR = 'TR'¶
- UA = 'UA'¶
- UA_BEI = 'UA_BEI'¶
- UA_DOBTPP = 'UA_DOBTPP'¶
- UA_IPS = 'UA_IPS'¶
- UK = 'UK'¶
- XK = 'XK'¶
- class openstef.enums.ForecastType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- BASECASE = 'basecase'¶
- DEMAND = 'demand'¶
- SOLAR = 'solar'¶
- WIND = 'wind'¶
- class openstef.enums.ModelType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
- ARIMA = 'arima'¶
- FLATLINER = 'flatliner'¶
- LGB = 'lgb'¶
- LINEAR = 'linear'¶
- LINEAR_QUANTILE = 'linear_quantile'¶
- XGB = 'xgb'¶
- XGB_MULTIOUTPUT_QUANTILE = 'xgb_multioutput_quantile'¶
- XGB_QUANTILE = 'xgb_quantile'¶
openstef.exceptions module¶
Openstef custom exceptions.
- exception openstef.exceptions.ComponentForecastTooShortHorizonError¶
Bases:
Exception
Component forecasts should be available for at least 30 hours in advance.
- exception openstef.exceptions.InputDataInsufficientError¶
Bases:
InputDataInvalidError
Insufficient input data.
- exception openstef.exceptions.InputDataInvalidError¶
Bases:
Exception
Invalid input data.
- exception openstef.exceptions.InputDataOngoingZeroFlatlinerError¶
Bases:
InputDataInvalidError
All recent load measurements are zero.
- exception openstef.exceptions.InputDataWrongColumnOrderError¶
Bases:
InputDataInvalidError
Wrong column order input data.
- exception openstef.exceptions.ModelWithoutStDev¶
Bases:
Exception
A machine learning model should have a valid standard deviation.
- exception openstef.exceptions.NoPredictedLoadError(pid, message='No predicted load found')¶
Bases:
Exception
No predicted load for given datatime range.
- exception openstef.exceptions.NoRealisedLoadError(pid, message='No realised load found')¶
Bases:
Exception
No realised load for given datetime range.
- exception openstef.exceptions.OldModelHigherScoreError¶
Bases:
Exception
Old model has a higher score then new model.
- exception openstef.exceptions.PredictionJobException(metrics=None)¶
Bases:
Exception
One or more prediction jobs raised an exception.
- exception openstef.exceptions.SkipSaveTrainingForecasts¶
Bases:
Exception
If old model is better or too young, you don’t need to save the traing forcast.