Theoretical Advances

Pattern Analysis and Applications

, Volume 9, Issue 4, pp 339-351

First online:

Using online linear classifiers to filter spam emails

  • Bin WangAffiliated withInstitute of Computing Technology, Chinese Academy of SciencesSchool of Computing, Dublin City University Email author 
  • , Gareth J. F. JonesAffiliated withSchool of Computing, Dublin City University
  • , Wenfeng PanAffiliated withInstitute of Computing Technology, Chinese Academy of Sciences

Rent the article at a discount

Rent now

* Final gross prices may vary according to local VAT.

Get Access


The performance of two online linear classifiers—the Perceptron and Littlestone’s Winnow—is explored for two anti-spam filtering benchmark corpora—PU1 and Ling-Spam. We study the performance for varying numbers of features, along with three different feature selection methods: information gain (IG), document frequency (DF) and odds ratio. The size of the training set and the number of training iterations are also investigated for both classifiers. The experimental results show that both the Perceptron and Winnow perform much better when using IG or DF than using odds ratio. It is further demonstrated that when using IG or DF, the classifiers are insensitive to the number of features and the number of training iterations, and not greatly sensitive to the size of training set. Winnow is shown to slightly outperform the Perceptron. It is also demonstrated that both of these online classifiers perform much better than a standard Naïve Bayes method. The theoretical and implementation computational complexity of these two classifiers are very low, and they are very easily adaptively updated. They outperform most of the published results, while being significantly easier to train and adapt. The analysis and promising experimental results indicate that the Perceptron and Winnow are two very competitive classifiers for anti-spam filtering.


Online linear classifier Perceptron Winnow Anti-spam filtering