mlnext.data.load_data_3d#

mlnext.data.load_data_3d(path: str, *, timesteps: int, format: Dict[str, Any] = {}, verbose: bool = True) ndarray[source]#

Loads data from path and temporalizes it with timesteps.

Parameters:
  • path (str) – Path to file.

  • timesteps (int) – Widow size.

  • format (T.Dict[str, T.Any]) – Format args for pd.read_csv.

  • verbose (bool) – Whether to print status information.

Returns:

Returns the data.

Return type:

np.ndarray

Example

>>> # Loading 2d data and reshaping it to 3d
>>> X_train = load_data_3d(path='./data/train.csv', timesteps=10)
>>> X_train.shape
(100, 10, 18)