Catboost TypeError:无法将系列转换为“ float”类

时间:2019-05-20 12:00:16

标签: python kaggle catboost

我正在尝试运行catboost算法并遇到此错误

/opt/conda/lib/python3.6/site-packages/pandas/core/series.py in wrapper(self)
    116             return converter(self.iloc[0])
    117         raise TypeError("cannot convert the series to "
--> 118                         "{0}".format(str(converter)))
    119 
    120     return wrapper

TypeError: cannot convert the series to class 'float'

我的代码块看起来像这样

from catboost import CatBoostRegressor
model=CatBoostRegressor(iterations=50, depth=3, learning_rate=0.1, loss_function='RMSE')
%time model.fit(train_x,train_y,cat_features=[0,1,2,3,8,9,10,11],eval_set=(test_x,test_y),plot=True)

我确保已将所有分类功能包括在cat_features列表中。仍然面临此问题。任何帮助将不胜感激。

0 个答案:

没有答案