edu.cmu.minorthird.classify.algorithms.linear
Class VitorBalancedWinnow

java.lang.Object
  extended by edu.cmu.minorthird.classify.OnlineClassifierLearner
      extended by edu.cmu.minorthird.classify.OnlineBinaryClassifierLearner
          extended by edu.cmu.minorthird.classify.algorithms.linear.VitorBalancedWinnow
All Implemented Interfaces:
BinaryClassifierLearner, ClassifierLearner, java.io.Serializable, java.lang.Cloneable

public class VitorBalancedWinnow
extends OnlineBinaryClassifierLearner
implements java.io.Serializable

Created on Sep 22, 2005

Author:
Vitor R. Carvalho Implements the modified version of the Balanced Winnow algorithm (MBW), following the ideas described in "Improving Winnow for NLP Tasks: Voting Schemes, Regret Minimization and Online Feature Selection", Vitor Carvalho, William Cohen and Avrim Blum, CMU Technical Report 2006 A Modified version of the Balanced Winnow algorithm, as described in "Learning Quickly when Irrelevant Attributes Abound: a new linear-threshold algorithm", N. Littlestone, Machine Learning, 1988. One of the modifications is based on the "thick-Margin trick used in "Mistake-Driven Learning in Text Categorization", I. Dagan, Y. Karov, D. Roth, EMNLP, 1997 Additionally, it implements the Voting scheme (averaged hypothesis). Please check the "voted" parameter for that.
See Also:
Serialized Form

Nested Class Summary
 class VitorBalancedWinnow.MyClassifier
           
 
Constructor Summary
VitorBalancedWinnow()
          Constructor
VitorBalancedWinnow(boolean voted)
          Constructor: voted="true" (more stable) or "false"(more aggressive)
VitorBalancedWinnow(double alpha, double beta, boolean voted)
           
 
Method Summary
 void addExample(Example example2)
          Subclasses should use this method to perform whatever incremental update is needed after in response to a new example.
 Classifier getClassifier()
          Subclasses should use this method to return the current classifier.
 void reset()
          'forget' everything about the last learning task, and start a new task.
 java.lang.String toString()
           
 void updateVotedHyperplane(int count)
           
 
Methods inherited from class edu.cmu.minorthird.classify.OnlineBinaryClassifierLearner
getBinaryClassifier, getSchema, setSchema
 
Methods inherited from class edu.cmu.minorthird.classify.OnlineClassifierLearner
completeTraining, copy, hasNextQuery, nextQuery, setInstancePool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.minorthird.classify.ClassifierLearner
completeTraining, copy, hasNextQuery, nextQuery, setInstancePool
 

Constructor Detail

VitorBalancedWinnow

public VitorBalancedWinnow()
Constructor


VitorBalancedWinnow

public VitorBalancedWinnow(boolean voted)
Constructor: voted="true" (more stable) or "false"(more aggressive)

Parameters:
voted -

VitorBalancedWinnow

public VitorBalancedWinnow(double alpha,
                           double beta,
                           boolean voted)
Method Detail

reset

public void reset()
Description copied from class: OnlineClassifierLearner
'forget' everything about the last learning task, and start a new task. Subclasses need to implement this method

Specified by:
reset in interface ClassifierLearner
Specified by:
reset in class OnlineClassifierLearner

addExample

public void addExample(Example example2)
Description copied from class: OnlineClassifierLearner
Subclasses should use this method to perform whatever incremental update is needed after in response to a new example.

Specified by:
addExample in interface ClassifierLearner
Specified by:
addExample in class OnlineClassifierLearner

updateVotedHyperplane

public void updateVotedHyperplane(int count)

getClassifier

public Classifier getClassifier()
Description copied from class: OnlineClassifierLearner
Subclasses should use this method to return the current classifier.

Specified by:
getClassifier in interface ClassifierLearner
Specified by:
getClassifier in class OnlineClassifierLearner

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object