|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.minorthird.classify.OnlineClassifierLearner
edu.cmu.minorthird.classify.OnlineBinaryClassifierLearner
edu.cmu.minorthird.classify.algorithms.linear.KernelVotedPerceptron
public class KernelVotedPerceptron
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.
Polynomial kernel is implemented: K(x,y) = (coef0+gamma*
Nested Class Summary | |
---|---|
class |
KernelVotedPerceptron.MyClassifier
|
Constructor Summary | |
---|---|
KernelVotedPerceptron()
Default Constructor: degree=3 and mode="voted" |
|
KernelVotedPerceptron(int degree,
java.lang.String mode)
Constructor: specifies degree of poly kernel and mode Example KernelVotedPerceptron(3,"averaged") or (5,"voted") |
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. |
void |
setKernel(int d)
set degree of poly kernel K(x,y) = (coef0+ gamma* |
void |
setModeAveraged()
|
void |
setModeVoted()
|
void |
setPolyKernelParams(double coef0,
double gamma)
set params of poly kernel K(x,y) = (coef0+ gamma* |
void |
setSpeedUp()
Set speed-up: use only last 300 support vectors in testing |
java.lang.String |
toString()
|
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 |
---|
public KernelVotedPerceptron(int degree, java.lang.String mode)
degree
- mode
- public KernelVotedPerceptron()
Method Detail |
---|
public void setKernel(int d)
d
- public void setPolyKernelParams(double coef0, double gamma)
coef0
- gamma
- public void reset()
OnlineClassifierLearner
reset
in interface ClassifierLearner
reset
in class OnlineClassifierLearner
public void setModeVoted()
public void setModeAveraged()
public void setSpeedUp()
public void addExample(Example example)
OnlineClassifierLearner
addExample
in interface ClassifierLearner
addExample
in class OnlineClassifierLearner
public Classifier getClassifier()
OnlineClassifierLearner
getClassifier
in interface ClassifierLearner
getClassifier
in class OnlineClassifierLearner
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |