Auto-arima from pmdarima gives 'Could not successfully fit a viable ARIMA model to input data' after one hot encoding and scaling

18 views Asked by At

I've tried to train a sarimax model through auto-arima function from the pmdarima library. First I've tried to train it without the scaling and encoding of categorical and numerical exogenous features respectively. I know this doesn't make much sense (in fact results were quite poor) but I've done it just to keep it simple and simply explore sarimax models world. Now I've implemented a simple function that applies scaling and one hot encoding to my exogenous features and auto-arima gives me this error:

Could not successfully fit a viable ARIMA model to input data. See http://alkaline-ml.com/pmdarima/no-successful-model.html for more information on why this can happen

To me the explanation given at this link doesn't seem clear enough (maybe my poor english), anyway I'll post here my code used to do encoding and scaling just to be clear

def scaleAndEncode(df, num_feat, cat_feat):
    ohe = sp.OneHotEncoder(sparse_output=False)
    catData = pd.DataFrame(ohe.fit_transform(df[cat_feat]))
    catData.columns = ohe.get_feature_names_out()
    nor = sp.MinMaxScaler()
    numData = pd.DataFrame(nor.fit_transform(df[num_feat]), columns=num_feat)
    fullData = catData.join(numData)
    return fullData
0

There are 0 answers