edu.cmu.minorthird.classify.algorithms.linear
Class RegretWinnow
java.lang.Object
edu.cmu.minorthird.classify.OnlineClassifierLearner
edu.cmu.minorthird.classify.OnlineBinaryClassifierLearner
edu.cmu.minorthird.classify.algorithms.linear.RegretWinnow
- All Implemented Interfaces:
- BinaryClassifierLearner, ClassifierLearner, java.io.Serializable, java.lang.Cloneable
public class RegretWinnow
- extends OnlineBinaryClassifierLearner
- implements java.io.Serializable
Created on Sep 22, 2005
- Author:
- Vitor R. Carvalho
Balanced Winnow algorithm as described in "Learning Quickly when Irrelevant
Attributes Abound: a new linear-threshold algorithm", N. Littlestone, Machine
Learning, 1988.
Notation and implementation details based on "Mistake-Driven
Learning in Text Categorization", I. Dagan, Y. Karov, D. Roth, EMNLP, 1997
Additionally, it implements 2 optional features:
(a) update when examples don't satisfy a margin requirement (margin parameter)
(b) optionally, classify with a voting scheme. (voted parameter)
(c) use of some types of regret minimization updates, based on "From External to Internal Regret,
Avrim Blum and Yishay Mansour, COLT 2005.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RegretWinnow
public RegretWinnow()
RegretWinnow
public RegretWinnow(double a,
double b,
boolean voted,
int mode)
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
getHistory
public int getHistory(java.util.List<ClassLabel> ll)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object