python - Penalize error on one category svm sklearn? -
i've got ~100 data elements 1 class, , ~6000 class. when create svm using data, returns majority category label every new element try predict on. there way penalize misclassification of minority category sklearn svm, can use data elements , not have sample 100 elements majority category use in testing?
svc has following parameter can use
class_weight : {dict, 'auto'}, optional set parameter c of class class_weight[i]*c svc. if not given, classes supposed have weight one. 'auto' mode uses values of y automatically adjust weights inversely proportional class frequencies.
Comments
Post a Comment