flennerhag / mlens

ML-Ensemble – high performance ensemble learning
http://ml-ensemble.com
MIT License
843 stars 108 forks source link

Getting error when executing the ensemble.fit(X_train, y_train) command #149

Open mottibz opened 1 year ago

mottibz commented 1 year ago

Hello, I am trying the library. When I execute the ensemble.fit(X_train, y_train) command, I get the following error:

KeyError: "None of [Int64Index([267180, 129519, 107251, 111543, 46121, 444517, 377219, 478839, 459175, 375335,\n ...\n 314965, 15940, 119331, 442821, 122226, 236511, 311195, 152930, 76479, 169471], dtype='int64', length=483660)] are in the [columns]"

What does this mean?

Thanks a lot, Motti

meetu30 commented 1 year ago

Hi, replace ensemble.fit(X_train, y_train) with ensemble.fit(X_train.values, y_train.values). Because internally it needs numpy array format