2
$\begingroup$

I am trying to build a model of 7 classes text documents.

However, i do not have equal number of samples for each class. I can have close to about 10k documents for class A but only about 100 samples for class E. How is it possible that I can improve my model. I am achieving about 80% accuracy currently.

$\endgroup$

2 Answers 2

2
$\begingroup$

In the paper "Tackling the Poor Assumptions of Naive Bayes Text Classifiers" there are given some modifications of the original algorithm that correct the bias in the estimation of the probabilities.

Hope that helps

$\endgroup$
2
  • $\begingroup$ hi do you have the code implementation for this algorithm or where can i find it? $\endgroup$
    – aceminer
    May 19, 2014 at 3:32
  • $\begingroup$ I remember it is implemented in a Perl module available in cpan. Otherwise i do not know any other. Nevertheless, if you have an implementation of nb, you can just add the correction for skew classes to your code $\endgroup$
    – jpmuc
    May 19, 2014 at 6:04
0
$\begingroup$

According to Jumpa paper, I have found a solution which implements the complement naive Bayes classifier in weka.

This is the url to the download.

http://weka.sourceforge.net/packageMetaData/complementNaiveBayes/index.html

$\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.