edu.cmu.minorthird.classify.algorithms.linear
Class VotedPerceptron
java.lang.Object
edu.cmu.minorthird.classify.OnlineClassifierLearner
edu.cmu.minorthird.classify.OnlineBinaryClassifierLearner
edu.cmu.minorthird.classify.algorithms.linear.VotedPerceptron
- All Implemented Interfaces:
- BinaryClassifierLearner, ClassifierLearner, java.io.Serializable, java.lang.Cloneable
public class VotedPerceptron
- extends OnlineBinaryClassifierLearner
- implements java.io.Serializable
Voted perceptron algorithm. As described in "Large Margin
Classification Using the Perceptron Algorithm", Yoav Freund and
Robert E. Schapire, Proceedings of the Eleventh Annual Conference
on Computational Learning Theory,
1998.
- Author:
- William Cohen
- See Also:
- Serialized Form
Method Summary |
void |
addExample(Example example)
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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VotedPerceptron
public VotedPerceptron()
VotedPerceptron
public VotedPerceptron(boolean ignoreWeights)
- If ignoreWeights is true, treat all weights as binary. For
backward compatibility with an older buggy version.
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 example)
- 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
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