Say I have only 1 positive for classifier training. Is there a way to train a model with scikit-learn with only one positive? (for example, similar to SVM).
I currently have the following:
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])
But I get the following error:
ValueError: The least populated class in y has only 2 members, which are too few. The minimum number of labels for any class cannot be less than k = 3.
source
share