本文介绍了Jupyter Notebook中的XGBoost崩溃内核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I don't know how to make the XGBoost classifier work. I am running the code below on Jupyter notebook, and it always generates this message "The kernel appears to have died. It will restart automatically."

from xgboost import XGBClassifier
model = XGBClassifier()
model.fit(X, y)

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

There is no problem with importing the XGBClassifier, but it crashes upon fitting it to my data. X is a 502 by 33 all-numeric dataframe, y is the set of 0 or 1 labels for each row.Does anyone know what could be the problem here? I downloaded the newest version of XGBoost through pip3 install, and also through Conda install.

谢谢!

推荐答案

我遇到了类似的问题.我通过安装较旧的0.80版本解决了该问题.

I was having similar problem. I solved it by installing an older version 0.80.

pip install xgboost==0.80

这篇关于Jupyter Notebook中的XGBoost崩溃内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 04:06