diff --git a/.gitignore b/.gitignore index e54b2aa52..5b0ef6518 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ nbs/.last_checked .idea mlruns/ .luarc.json +venv \ No newline at end of file diff --git a/statsforecast/arima.py b/statsforecast/arima.py index 890522ede..8dafdddac 100644 --- a/statsforecast/arima.py +++ b/statsforecast/arima.py @@ -1481,8 +1481,9 @@ def Arima( missing = np.isnan(tmp["residuals"]) nonmiss_idxs = np.where(~missing)[0] firstnonmiss = np.min(nonmiss_idxs) - lastnonmiss = np.max(nonmiss_idxs) - n = np.sum(~missing[firstnonmiss:lastnonmiss]) + # lastnonmiss = np.max(nonmiss_idxs) + # n = np.sum(~missing[firstnonmiss:lastnonmiss]) + n = np.sum(~missing[firstnonmiss:]) nstar = n - tmp["arma"][5] - tmp["arma"][6] * tmp["arma"][4] tmp["aicc"] = tmp["aic"] + 2 * npar * (nstar / (nstar - npar - 1) - 1) tmp["bic"] = tmp["aic"] + npar * (math.log(nstar) - 2)