model#
Provides an abstract Model.
- class Model(time_series_params: TimeSeriesConfig, model_params: ModelConfig)#
Bases:
ABCDefines the abstract model.
Inits the model.
- Parameters:
time_series_params – Time-series parameters that affect the training and architecture of models
model_params – configuration for the model.
- Raises:
TypeError – if input_length or output_length is not an integer.
- property name: str#
Returns the models name.
- Returns:
The models name.
- abstract predict(data: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]]#
Predicts the next timesteps.
- Parameters:
data – 3 dimensional numpy array. First dimension contains time-series. Second dimension contains time steps of a time-series. Third dimension contains the attributes at a single timestep.
- abstract train(train: list[numpy.ndarray[Any, numpy.dtype[numpy.float64]]]) None#
Trains the model with the given data.
- Parameters:
train – training data.
- validate_prediction_input(data: ndarray[Any, dtype[float64]]) None#
Validates the input of the predict function.
- Parameters:
data – a single dataframe containing the input data, where the output will be predicted.
- Raises:
ValueError – if data has incorrect shape (row length does not equal )
- class ModelConfig(name: str = 'Model')#
Bases:
objectDefines the configuration for the Model.