XGBoost:操作系统错误:[WinError -529697949] Windows错误0xe06d7363运行带有大型数据集的XGBClassifier,CPU模式

问题描述 投票:0回答:1

尝试运行XGBClassifier和GridsearchCV进行超参数优化时出现此错误。我已经看到此问题在Github中打开,但已关闭并标记为已解决,但未提供解决方案。有人真的找到了解决此错误的方法吗?

我的数据集:

X = np array with 350000 rows and 1715 columns (after one hot encoding)
y = 350000 rows and 1 column (target) 

我的代码:

X = train.drop(['Breakage'], axis=1,)  #features (read from dataframe)
y = train['Breakage']    #target (read from dataframe)

X= X.as_matrix()    #convert to np array
y= y.as_matrix()    #convert to np array
y = np.reshape(y,(-1, 1))    #reshape array

X = X.astype('uint8')  #Change dtype to avoid overcommmit error in windows
y = y.astype('uint8')  #Change dtype to avoid overcommmit error in windows

#define estimators and learning rate
model = XGBClassifier()
n_estimators = [100, 200, 300, 400, 500]
learning_rate = [0.0001, 0.001, 0.01, 0.1]

# GRidSearchCV
param_grid = dict(learning_rate=learning_rate, n_estimators=n_estimators)
kfold = StratifiedKFold(n_splits=5, shuffle=True, random_state=7)
grid_search = GridSearchCV(model, param_grid, n_jobs=-1, cv=kfold)
grid_result = grid_search.fit(X,y)

输出错误:

OSError: [WinError -529697949] Windows Error 0xe06d7363

谁能告诉我我在做什么错

python-3.x xgboost
1个回答
0
投票

您最终找到了解决方案,因为我有同样的错误吗?

© www.soinside.com 2019 - 2024. All rights reserved.