You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After exporting my ensemble and trying to fit the new base_learner to my data, I encountered the following error:
FutureWarning:
Passing list-likes to .loc or [] with any missing label will raise
KeyError in the future, you can use .reindex() as an alternative.
See the documentation here:
http://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike
return self.loc[key]
I don't fully understand the error, but after a bit of digging I found that the guilty line was
base_learner.fit(X[train_idx], y[train_idx]), under the fit method of the XcessivStackedEnsemble class. I fixed this by using y.iloc[train_idx] instead of y[train_idx].
I don't know if this is just a case of human error, but for anyone else having the same issue, this fixed it for me.
The text was updated successfully, but these errors were encountered:
It's a pandas warning. loc or iloc should be use, depending on the context and the values in train_idx (if they are values from the index column of the dataframe or just "literal indexes" (as in the position in the dataframe)).
After exporting my ensemble and trying to fit the new base_learner to my data, I encountered the following error:
I don't fully understand the error, but after a bit of digging I found that the guilty line was
base_learner.fit(X[train_idx], y[train_idx])
, under thefit
method of theXcessivStackedEnsemble
class. I fixed this by usingy.iloc[train_idx]
instead ofy[train_idx]
.I don't know if this is just a case of human error, but for anyone else having the same issue, this fixed it for me.
The text was updated successfully, but these errors were encountered: