TimeSeriesIterator
- class lightautoml.validation.np_iterators.TimeSeriesIterator(datetime_col, n_splits=5, date_splits=None, sorted_kfold=False)[source]
Bases:
object
Time Series Iterator.
- static split_by_dates(datetime_col, splitter)[source]
Create indexes of folds splitted by thresholds.
- Parameters
datetime_col – Column with value which can be interpreted as time/ordinal value (ex: np.datetime64).
splitter – List of thresholds (same value as ).
- Returns
Array of folds’ indexes.
- Return type
folds
- static split_by_parts(datetime_col, n_splits)[source]
Create indexes of folds splitted into equal parts.
- Parameters
datetime_col – Column with value which can be interpreted as time/ordinal value (ex: np.datetime64).
n_splits (
int
) – Number of splits(folds).
- Returns
Array of folds’ indexes.
- Return type
folds