我的Jupyter笔记本的python内核不断消亡。我之前已经成功运行了以下所有代码。目前,存在问题。首先,我将向您展示我能够成功运行的代码块:
import xgboost as xgb
xgtrain = xgb.DMatrix(data = X_train_sub.values, label = Y_train.values) # create dense matrix of training values
xgtest = xgb.DMatrix(data = X_test_sub.values, label = Y_test.values) # create dense matrix of test values
param = {'max_depth':2, 'eta':1, 'silent':1, 'objective':'binary:logistic'} # specify parameters via map
Run Code Online (Sandbox Code Playgroud)
我的数据很小的地方:
X_train_imp_sub.shape
(1365, 18)
Run Code Online (Sandbox Code Playgroud)
但是,我笔记本的内核一直死在这个块上:
xgmodel = xgb.train(param, xgtrain, num_boost_round = 2) # train the model
predictions = xgmodel.predict(xgtest) # make prediction
from sklearn.metrics import accuracy_score
accuracy = accuracy_score(y_true = Y_test,
y_pred = predictions.round(), …Run Code Online (Sandbox Code Playgroud) 我最近卸载了一个很好的Enthought Canopy 32位工作副本并安装了Canopy版本1.1.0(64位).当我尝试使用sklearn来适应模型我的内核崩溃时,我收到以下错误:
The kernel (user Python environment) has terminated with error code 3. This may be due to a bug in your code or in the kernel itself.
Output captured from the kernel process is shown below.
OMP: Error #15: Initializing libiomp5md.dll, but found mk2iomp5md.dll already initialized.
OMP: Hint: This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The …Run Code Online (Sandbox Code Playgroud)