我运行代码时收到以下警告
DeprecationWarning: From version 0.18, binary input will not be handled
specially when using averaged precision/recall/F-score. Please use
average='binary' to report only the positive class performance.
'positive class performance.', DeprecationWarning
这是我的代码
splits = StratifiedShuffleSplit(labels, n_iter = 5, test_size = 0.2)
if(condition):
scorefunc = make_scorer(fbeta_score, beta = 1, pos_label = labels[0])
else:
scorefunc = make_scorer(fbeta_score, beta = 1, pos_label = None)
params1 = {'penalty':['l1'],'C':[0.0001, 0.001, 0.01, 0.1, 1.0]}
lr = GridSearchCV(LogisticRegression(), param_grid = params1, cv = splits, n_jobs = 5, scoring = scorefunc)
lr.fit(matrix, labels)
我怀疑这与我如何处理pos_label参数有关,但是阅读文档我无法弄清楚我做错了什么。有什么想法吗?