0
votes

I am trying to use the Naive Bayes classifier in sklearn for multi-class classification. I want to obtain the scores using 10-fold cross-validation. Assuming that x is my feature array and y is the label vector, I am doing this:

    clf = MultinomialNB(fit_prior=False)
    scores = cross_validation.cross_val_score(OneVsOneClassifier(clf), x, y, cv=10)

But this just gives me an array of 10 scores for each of the folds. What I want is the score for each pair of classes from the OvO classifier. Any suggestions on how to do this?

Also is there any way we can use a customized smoothing technique for the NB classifier?

1

1 Answers

1
votes

What I want is the score for each pair of classes from the OvO classifier.

Unfortunately, the OvO wrapper currently doesn't have a public API to get to these scores.

Also is there any way we can use a customized smoothing technique for the NB classifier?

No, Lidstone smoothing is currently the only option.