ts_benchmark.baselines.duet package
The following module is for adapting the DUET model to TFB.
ts_benchmark.baselines.duet.duet module
Classes
|
|
|
- class DUET(**kwargs)[source]
Bases:
ModelBase- batch_forecast(horizon: int, batch_maker: BatchMaker, **kwargs) numpy.ndarray[source]
Make predictions by batch.
- Parameters:
horizon – The length of each prediction.
batch_maker – Make batch data used for prediction.
- Returns:
An array of predicted results.
- forecast(horizon: int, train: pandas.DataFrame) numpy.ndarray[source]
Make predictions.
- Parameters:
horizon – The predicted length.
testdata – Time data data used for prediction.
- Returns:
An array of predicted results.
- forecast_fit(train_valid_data: pandas.DataFrame, train_ratio_in_tv: float) ModelBase[source]
Train the model.
- Parameters:
train_data – Time data data used for training.
train_ratio_in_tv – Represents the splitting ratio of the training set validation set. If it is equal to 1, it means that the validation set is not partitioned.
- Returns:
The fitted model object.
- property model_name
Returns the name of the model.