Why Does Cross Validation For Randomforestregressor Fail In Scikit-learn
The input training or testing file format are as follows: -1 1 11.10115101|u 11.10115101 |s 2 |reason k:0.116|pv pv1000|g 2230444827 |k k3|w k:0 -1 1 11.10115101|u 11.10115101 |s 0
Solution 1:
This error is matching the recently reported issue #2508.
A workaround would be to call add:
test_targets = np.asarray(test_targets)
prior to calling cross_val_score
.
Solution 2:
I use another way to cal auc like :
preds = clf.predict_proba(test)
fpr, tpr, thresholds = roc_curve( test_targets, preds[:, 1])
roc_auc = auc(fpr, tpr)
Post a Comment for "Why Does Cross Validation For Randomforestregressor Fail In Scikit-learn"