1
$\begingroup$

I am trying to use Naive Bayes to perform text classification. I have two classes A and B. I am mainly interested in identifying class A.

Description about the dataset:

  1. Some of the text contents that belong to class A can also be found in class B.
  2. But some of the text contents are only found in class A.
  3. The entire dataset is pretty small.

Training Set:

Number of Datapoints for class A: 275

Number of Datapoints for class B: 691

Testing Set:

Number of Datapoints for class A: 238

Number of Datapoints for class B: 403


I am using sci-kit learn's multinomialNB to perform the text classification.

The result that I got after running the Naive Bayes classifier on my test set:

Number of datapoints for class A (True Positive): 0

Number of datapoints for class B (True Negative): 401

Number of datapoints for class A (False Positive): 2

Number of datapoints for class B (False Negative): 238

EDIT:

I would like to know how can I improve the classification result of the aforementioned dataset?

$\endgroup$
2
  • $\begingroup$ What actualy is your question...? $\endgroup$ Commented Apr 25, 2017 at 23:25
  • $\begingroup$ @Unhandledexception edited my question? $\endgroup$
    – John Rambo
    Commented Apr 26, 2017 at 0:18

1 Answer 1

0
$\begingroup$

You can try using a different classifier like logistic regression. Logistic regression is easier to regularize and that will help you avoid the problem of always predicting the same class.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.