transfer_learning_model#

Provides an abstract Model.

class TransferLearningModel(time_series_params: TimeSeriesConfig, model_params: ModelConfig)#

Bases: ABC

Defines 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(synthetic: list[numpy.ndarray[Any, numpy.dtype[numpy.float64]]], observed: list[numpy.ndarray[Any, numpy.dtype[numpy.float64]]]) None#

Trains the model with the given data.

Parameters:
  • synthetic – synthetic time-series training data.

  • observed – observed time-series 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 )