0
假设我只有1个正面训练分类器。有没有什么方法可以通过scikit-learn来训练一个模型,只有一个积极的? (例如类似于示例性SVM)。scikit-learn的一次性学习
此刻,我有以下几点:
scores = [
('precision', precision_score),
]
for score_name, score_func in scores:
clf = GridSearchCV(SVC(C=1), tuned_parameters, score_func=score_func)
clf.fit(X[train], y[train])
y_true, y_pred = y[test], clf.predict(X[test])
,但我得到了以下错误:
ValueError: The least populated class in y has only 2 members, which is too few. The minimum number of labels for any class cannot be less than k=3.