Closed stellaywu closed 4 years ago
This may be a bug: I think the intended behavior is that if you disable categorical features then the cardinality is automatically set (to 1). Will get back to you about this, thanks for reporting it!
@stellaywu for the moment, you can just set cardinality=[1]
together with use_feat_static_cat=False
thanks for the quick fix! @lostella Does cardinality= [1] do anything? the results looks different with different cardinality value. Another somewhat related question - If I want to predict multiple time series at the same time, is it correct to just feed them all at once in one model?
thanks for the quick fix! @lostella
You're welcome, but no fix was involved :-) this is just the way to make it work when you set feat_static_cat=False
, currently. We should either improve the documentation there, or improve the API of this estimator in some way (see #799 for related discussion)
Does cardinality= [1] do anything? the results looks different with different cardinality value.
When you set feat_static_cat=False
, the model injects fake categorical features in the data, all equal to zero. So there is one categorical feature with cardinality 1, so you should set it to [1]
. Other settings may also work (in the sense that the model runs) but I'm not sure how that will affect the quality of the model.
Another somewhat related question - If I want to predict multiple time series at the same time, is it correct to just feed them all at once in one model?
That's correct, once you've trained a predictor, you can use it to predict a whole dataset of time series at once, and it will return to you an iterator over the forecast objects, one for each element in the input dataset.
Using gluonts 0.4.2 got error message when trying
estimator = DeepStateEstimator( freq='D', prediction_length=prediction_length, past_length=context_length, use_feat_static_cat=False, use_feat_dynamic_real=True, trainer=Trainer(ctx="cpu", epochs=50, learning_rate=1e-3, num_batches_per_epoch=100 ) )
error message as follows. What makes sense to put for cardinality when use_feat_static_cat is set to False? Thank you!