【发布时间】:2016-04-02 20:13:04
【问题描述】:
我尝试使用pandas_ml library 完成交叉验证
df = pdml.ModelFrame(features, target)
estimators = {'SVM: SVR': df.svm.SVR(),
'SVM: LinearSVR': df.svm.LinearSVR()}
for label, estimator in estimators.iteritems():
scores = df.cross_validation.cross_val_score(estimator=estimator, cv=7, scoring='accuracy')
print("Accuracy: %0.2f (+/- %0.2f) [%s]" % (scores.mean(), scores.std(), label))
但是,我遇到了意外的错误
raise ValueError("{0} is not supported".format(y_type))
ValueError: 不支持连续
这里有什么技巧吗?
【问题讨论】:
标签: python python-2.7 pandas machine-learning scikit-learn