hibou.data_preprocessing.split#

hibou.preprocessing.split(*args, **kwargs)#

This function split the inputs and the targets data into two datasets: training and testing.

Parameters#

inputspd.DataFrame

The inputs data.

targetspd.DataFrame

The targets data.

timestampspd.DataFrame

The timestamps of the data. Please note that as the inputs and targets data are supposed synchronized, you only need to pass one timestamps.

nb_trainint

The number of points into each training data sets.

nb_testint

The number of points into each testing data sets.

offsetint, optionnal

By default: 0. The number of points to be shifted in training and evaluation sets.

displaybool, optionnal

By default: False. If set on True, the function will plot the targets that are used for training and testing on a figure.

Note

The figure will not be showed, but saved into {OUTPUT_DIR}/figures.

Returns#

tuple

A tuple that contains two elements: training data and testing data. Each element is itself a tuple that contains three elements: inputs, targets, timestamps.