Jupyter Notebook中的XGBoost崩溃内核

Zof*_*fia 2 python kernel anaconda xgboost jupyter-notebook

我不知道如何使XGBoost分类器工作。我在jupyter笔记本上运行以下代码,并且始终生成此消息“内核似乎已死亡。它将自动重新启动。”

from xgboost import XGBClassifier
model = XGBClassifier()
model.fit(X, y)
Run Code Online (Sandbox Code Playgroud)

导入XGBClassifier没问题,但是将其拟合到我的数据时会崩溃。X是502 x 33的全数字数据帧,y是每行0或1个标签的集合。有人知道这可能是什么问题吗?我通过pip3安装以及conda安装下载了xgboost的最新版本。

谢谢!

小智 16

我有类似的问题。我通过安装较旧的0.80版本解决了该问题。

pip install xgboost==0.80
Run Code Online (Sandbox Code Playgroud)