https://github.com/nixtla logo
p

Piotr Pomorski

03/05/2023, 6:32 PM
Hi, everytime I run the following
Copy code
mlf = MLForecast(models=models, differences=[1], date_features=['month'],
                 lags=None, num_threads=mp.cpu_count()-1,
                 lag_transforms=None, freq='W-FRI')
Where it just transforms the price series via
differences=[1]
, I always end up with
ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
Well, I guess it's obvious that the moment you apply first-difference there will be nans, why MLForecast does not delete the first row? And to precede your question, no, my original dataset has no nans.
m

Max (Nixtla)

03/05/2023, 7:39 PM
Hi @Piotr Pomorski! @José Morales can probably help you.
p

Piotr Pomorski

03/05/2023, 7:55 PM
Turns out I also had to specify lags for it to work. Odd stuff, possible fix in some newer version?