@PublicationReference(title="Large Margin Classification Using the Perceptron Algorithm", author={"Yoav Freund","Robert E. Schapire"}, year=1999, type=Journal, publication="Machine Learning", pages={277,296}, url="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.8200") public class OnlineVotedPerceptron extends AbstractSupervisedBatchAndIncrementalLearner<Vectorizable,java.lang.Boolean,WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer>> implements VectorFactoryContainer
| Modifier and Type | Field and Description |
|---|---|
protected VectorFactory<?> |
vectorFactory
The factory to create weight vectors.
|
| Constructor and Description |
|---|
OnlineVotedPerceptron()
Creates a new
OnlinePerceptron. |
OnlineVotedPerceptron(VectorFactory<?> vectorFactory)
Creates a new
OnlinePerceptron with the given vector factory. |
| Modifier and Type | Method and Description |
|---|---|
WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer> |
createInitialLearnedObject()
Creates a new initial learned object, before any data is given.
|
static DefaultWeightedValue<LinearBinaryCategorizer> |
getLastMember(WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer> ensemble)
Gets the last member in the ensemble.
|
VectorFactory<?> |
getVectorFactory()
Gets the VectorFactory used to create the weight vector.
|
void |
setVectorFactory(VectorFactory<?> vectorFactory)
Sets the VectorFactory used to create the weight vector.
|
void |
update(WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer> target,
Vector input,
boolean actual)
The
update method updates an object of ResultType using
the given a new supervised input-output pair, using some form of
"learning" algorithm. |
void |
update(WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer> target,
Vectorizable input,
java.lang.Boolean output)
The
update method updates an object of ResultType using
the given a new supervised input-output pair, using some form of
"learning" algorithm. |
updateclone, learn, learn, updateequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlearnlearnupdatecloneprotected VectorFactory<?> vectorFactory
public OnlineVotedPerceptron()
OnlinePerceptron.public OnlineVotedPerceptron(VectorFactory<?> vectorFactory)
OnlinePerceptron with the given vector factory.vectorFactory - The vector factory to use to create the weight vectors.public WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer> createInitialLearnedObject()
IncrementalLearnercreateInitialLearnedObject in interface IncrementalLearner<InputOutputPair<? extends Vectorizable,java.lang.Boolean>,WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer>>public void update(WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer> target, Vectorizable input, java.lang.Boolean output)
SupervisedIncrementalLearnerupdate method updates an object of ResultType using
the given a new supervised input-output pair, using some form of
"learning" algorithm.update in interface SupervisedIncrementalLearner<Vectorizable,java.lang.Boolean,WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer>>target - The object to update.input - The supervised input to learn from.output - The supervised output to learn from.public void update(WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer> target, Vector input, boolean actual)
update method updates an object of ResultType using
the given a new supervised input-output pair, using some form of
"learning" algorithm.target - The object to update.input - The supervised input vector to learn from.actual - The supervised output label to learn from.public static DefaultWeightedValue<LinearBinaryCategorizer> getLastMember(WeightedBinaryEnsemble<Vectorizable,LinearBinaryCategorizer> ensemble)
ensemble - The ensemble to get the last member from.public VectorFactory<?> getVectorFactory()
getVectorFactory in interface VectorFactoryContainerpublic void setVectorFactory(VectorFactory<?> vectorFactory)
vectorFactory - The VectorFactory used to create the weight vector.