我是整体学习和方法的新手,并且已经使用sklearn构建了以下模型
std = RobustScaler()
std.fit(train_feats)
train_feats = std.transform(train_feats)
val_feats = std.transform(val_feats)
# define base learners
# XGB classifier
xgb_classifier = xgb.XGBClassifier(objective='binary:logistic',
learning_rate=0.1,
n_estimators=10,
max_depth=1,
subsample=0.4,
random_state=234)
# SVM
svm_classifier = SVC(gamma=0.1,
C=0.1,
kernel='poly',
degree=3,
coef0=10.0,
probability=True)
# random forest classifier
rf_classifier = RandomForestClassifier(n_estimators=10,
max_features="sqrt",
criterion='entropy',
class_weight='balanced')
# Define meta-learn
voting_clf = VotingClassifier([("xgb", xgb_classifier),
("svm", svm_classifier),
("rf", rf_classifier)],
voting="soft",
flatten_transform=True)
voting_clf.fit(train_feats, train_labels)
该模型已经运行了5个小时。火车专长的形状为:(18000,29)。投票分类器连续运行5小时没有停止迹象是正常的吗?这里有错误吗?除非我知道事情有误并且存在错误,否则我不想停止训练并重新运行。
我很好奇,是否有一个会拖延培训时间的错误,或者通常是这样,需要很长时间进行培训?