getting error "ValueError: math domain error" #654
Replies: 2 comments
-
Hello @razieh8051! I am getting similar error while running the fit method of statsforecast library. I checked my data and it does have any null values nor any negative values. Did you get any solution to this? If yes, then can you please share it? |
Beta Was this translation helpful? Give feedback.
-
Hey @razieh8051, sorry for the late reply. I've investigated this and there's a bug that only raises an error when there's a single sample, but it's wrong in general. I've opened #690 to track it. In the meantime you can define a fallback model in the statsforecast constructor that will be used when this error happens with arima or you can also drop series with only a single point. Please let us know if you have further doubts. |
Beta Was this translation helpful? Give feedback.
-
I am getting an error about the log function false input when using the
sf.fit(df)
for AutoARIMA. I checked my inputs of 'unique_id', 'ds', 'y' for df which are in correct format:unique_id int64
ds datetime64[ns]
y float64
and there is no NaN or negative numbers that could cause this. Any ideas what could be wrong?
Update:
Here, in
fm[i, i_model] = new_model.fit(y=y, X=X)
of this line,y
is supposed to be(n,)
or(1,)
? I figured in my input going into the loop it is(1,)
and probably this what makesn
negative in this line and then thismath.log
line cannot proceed.ga
in this line has the shape as(n, 1) <class 'numpy.recarray'>
in both my input and your sample but when enters the loopfor i, grp in enumerate(self):
in the sample providedgrp
becomes(n, )
but in my input it becomes(1,)
; not sure why this is the case.Beta Was this translation helpful? Give feedback.
All reactions