Open ikulyatin opened 3 years ago
Another alternative solution: clarify in the documentation that the dictionary has to contain the name of the variable, e.g. scalers = {"value": None}
.
EDIT: a related issue:
If is set:
from sklearn.preprocessing import MinMaxScaler
dataset = TimeSeriesDataset(
...,
scalers={"value": MinMaxScaler()}`
...,
)
Calling dataset.scalers
returns {'value': TorchNormalizer(method='identity')}
. Am I setting this wrong? I guess this part in timeseries.py is dealing with this (lines 536-537):
if self.target in self.reals:
self.scalers[self.target] = self.target_normalizer
What I'm trying to do is to normalize my input values, which should also normalize the targets. With MinMaxScaler()
I want it to scale by min-max within the test set. Maybe this is not the intended use for scalers
and I should preprocess my data before feeding it to TimeSeriesDataset
?
I think the minmax scaler is not implemented at the moment - it should be easy to change that though! Also, currently, one cannot use a different scaler for inputting targets and outputting them. Might be worth adjusting this.
There is now an improved check in place #220.
Expected behavior
Executed code:
Expected a dataset object.
Actual behavior
Got:
Code to reproduce the problem
See above. The fix is either in the documentation (specify to set scalers to '', rather than None), or in the timeseries.py module.