FoldMask¶
- class FoldMask(first_train_timestamp: Optional[Union[str, pandas._libs.tslibs.timestamps.Timestamp]], last_train_timestamp: Union[str, pandas._libs.tslibs.timestamps.Timestamp], target_timestamps: List[Union[str, pandas._libs.tslibs.timestamps.Timestamp]])[source]¶
Bases:
etna.core.mixins.BaseMixin
Container to hold the description of the fold mask.
Fold masks are expected to be used for backtest strategy customization.
Init FoldMask.
- Parameters
first_train_timestamp (Optional[Union[str, pandas._libs.tslibs.timestamps.Timestamp]]) – First train timestamp, the first timestamp in the dataset if None is passed
last_train_timestamp (Union[str, pandas._libs.tslibs.timestamps.Timestamp]) – Last train timestamp
target_timestamps (List[Union[str, pandas._libs.tslibs.timestamps.Timestamp]]) – List of target timestamps
- Inherited-members
Methods
set_params
(**params)Return new object instance with modified parameters.
to_dict
()Collect all information about etna object in dict.
validate_on_dataset
(ts, horizon)Validate fold mask on the dataset with specified horizon.
- validate_on_dataset(ts: etna.datasets.tsdataset.TSDataset, horizon: int)[source]¶
Validate fold mask on the dataset with specified horizon.
- Parameters
ts (etna.datasets.tsdataset.TSDataset) – Dataset to validate on
horizon (int) – Forecasting horizon