splits#
Module containing splitting functionalities.
- train_test_split(data: list[pandas.core.frame.DataFrame], test_split: float = 0.2, input_length: float = 0, split_axis: str = 'vertical') tuple[list[pandas.core.frame.DataFrame], list[pandas.core.frame.DataFrame]]#
Splits a given dataframe in train, test and validations split.
- Parameters:
data – List of time series.
test_split – percentage of data that will be used for the test split.
input_length – length of the input window. Defaults to 0.
split_axis – Axis along which the data will be split. Either “horizontal” or “vertical”.
- Returns:
Tuple of train and test set.
- Raises:
ValueError – if split_axis is not “horizontal” or “vertical”.
- train_test_split_horizontal(data: list[pandas.core.frame.DataFrame], test_split: float) tuple[list[pandas.core.frame.DataFrame], list[pandas.core.frame.DataFrame]]#
Splits a given dataframe in train, test and validations split.
- Parameters:
data – List of time series.
test_split – percentage of data that will be used for the test split.
- Returns:
Tuple of train and test set.
- train_test_split_vertical(data: list[pandas.core.frame.DataFrame], test_split: float, input_length: float) tuple[list[pandas.core.frame.DataFrame], list[pandas.core.frame.DataFrame]]#
Splits a given dataframe in train, test and validations split.
- Parameters:
data – List of time series.
test_split – percentage of data that will be used for the test split.
input_length – length of the input window.
- Returns:
Tuple of train and test set.