awslabs / gluonts

Probabilistic time series modeling in Python
https://ts.gluon.ai
Apache License 2.0
4.56k stars 748 forks source link

Problem with NPTS predictor #894

Closed parimuns closed 4 years ago

parimuns commented 4 years ago

I am comparing my results with all the methods and when I use NPTS predictor as

from gluonts.model.npts import NPTSEstimator
from gluonts.trainer import Trainer
from gluonts.model.npts import NPTSPredictor

estimator=NPTSEstimator(freq='H',
        prediction_length=24
Predictor=NPTSPredictor(freq='H', prediction_length=24, context_length= 48, kernel_type='exponential',use_seasonal_model= True, use_default_time_features = True
predictor =Predictor.train(train_ds))`

Then my issue is how to call the training dataset (train_ds) by NPTS predictor.

jaheba commented 4 years ago

Hello,

npts doesn't require training. I.e train just returns the predictor:

https://github.com/awslabs/gluon-ts/blob/f0a07066091e30529dd72154c7fffc5939a0eef5/src/gluonts/model/estimator.py#L111-L116

The predictor itself does not implement predict.