CategoryType - The type of output categories. Can be any type that has a valid
equals and hashCode method.@PublicationReference(title="Ultraconservative online algorithms for multiclass problems", author={"Koby Crammer","Yoram Singer"}, year=2003, type=Journal, publication="The Journal of Machine Learning Research", pages={951,991}, url="http://portal.acm.org/citation.cfm?id=944936") public static class OnlineMultiPerceptron.ProportionalUpdate<CategoryType> extends OnlineMultiPerceptron<CategoryType>
OnlineMultiPerceptron.ProportionalUpdate<CategoryType>, OnlineMultiPerceptron.UniformUpdate<CategoryType>| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_MIN_MARGIN
The default minimum margin is 0.001.
|
minMargin, vectorFactory| Constructor and Description |
|---|
ProportionalUpdate()
Creates a new
OnlineMultiPerceptron.ProportionalUpdate. |
ProportionalUpdate(double minMargin)
Creates a new
OnlineMultiPerceptron.ProportionalUpdate with the
given minimum margin. |
ProportionalUpdate(double minMargin,
VectorFactory<?> vectorFactory)
Creates a new
OnlineMultiPerceptron.ProportionalUpdate with the
given minimum margin and backing vector factory. |
| Modifier and Type | Method and Description |
|---|---|
void |
setMinMargin(double minMargin)
Gets the minimum margin to enforce.
|
void |
update(LinearMultiCategorizer<CategoryType> target,
InputOutputPair<? extends Vectorizable,CategoryType> example)
The
update method updates an object of ResultType using
the given new data of type DataType, using some form of
"learning" algorithm. |
createInitialLearnedObject, getMinMargin, getVectorFactory, setVectorFactoryclone, learn, learn, updatepublic static final double DEFAULT_MIN_MARGIN
public ProportionalUpdate()
OnlineMultiPerceptron.ProportionalUpdate.public ProportionalUpdate(double minMargin)
OnlineMultiPerceptron.ProportionalUpdate with the
given minimum margin.minMargin - The minimum margin to consider an example correct.public ProportionalUpdate(double minMargin,
VectorFactory<?> vectorFactory)
OnlineMultiPerceptron.ProportionalUpdate with the
given minimum margin and backing vector factory.minMargin - The minimum margin to consider an example correct.vectorFactory - The vector factory used to create the weight vectors.public void update(LinearMultiCategorizer<CategoryType> target, InputOutputPair<? extends Vectorizable,CategoryType> example)
IncrementalLearnerupdate method updates an object of ResultType using
the given new data of type DataType, using some form of
"learning" algorithm.update in interface IncrementalLearner<InputOutputPair<? extends Vectorizable,CategoryType>,LinearMultiCategorizer<CategoryType>>update in class OnlineMultiPerceptron<CategoryType>target - The object to update.example - The new data for the learning algorithm to use to update
the object.public void setMinMargin(double minMargin)
OnlineMultiPerceptronsetMinMargin in class OnlineMultiPerceptron<CategoryType>minMargin - The minimum margin. Cannot be negative.