在我的公司将每个人都升级到Windows 10之后,使用Xgboost的Python脚本开始失败。
具体来说,此代码段失败:
from xgboost import XGBClassifier
from xgboost import XGBRegressor
from xgboost import plot_tree
from xgboost import plot_importance
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
import numpy as np
# Split Data into X and y
X = np.array(dfx.iloc[:,0:-1])
Y = np.array(dfx.iloc[:,-1])
# Train Test Split
seed = 7
test_size = 0.33
X_train, X_test, y_train, y_test = train_test_split(X,Y,test_size=test_size,random_state=seed)
# Train Model
model = XGBClassifier(n_estimators=1000,max_depth=5)
model.fit(X_train,y_train)
在最后一行出现以下错误:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
此脚本以前也可以使用,并且Windows 10的更改是我想到的唯一主要区别。
我尝试卸载并重新安装xgboost库