diff --git a/src/data_preparation.py b/src/data_preparation.py index bbd306d87ae9ef9530d6691d56a6d9318c239de8..6da63d3ad1bfc5089f63fbfea129fa2694c9d3e7 100644 --- a/src/data_preparation.py +++ b/src/data_preparation.py @@ -9,7 +9,7 @@ import logging import os from src import join, helpers from src import statistics -from typing import Union, List, Dict, Iterable +from typing import Union, List, Iterable import datetime as dt @@ -18,6 +18,15 @@ date = Union[dt.date, dt.datetime] class DataPrep(object): + """ + This class prepares data to be used in neural networks. Especially the following steps can be performed + - interpolate: interpolate between data points by using xarray's interpolation method + - standardise: standardise data to mean=1 and std=1, or just centralise to mean=0 + - make window history: to present the history (time steps before) for training/ testing; X + - make labels: create target vector for training/ testing; y + - remove Nans jointly from desired input and output, only keeps time steps where no NaNs are present in X AND y + - some other methods to ensure that the functions above are working properly + """ def __init__(self, path: str, network: str, station: Union[str, List[str]], variables: List[str], **kwargs): self.path = os.path.abspath(path)