InputType - The type of input to learn over. Passed to the kernel function.@PublicationReference(author={"Ofer Dekel","Shai Shalev-Shwartz","Yoram Singer"}, title="The Forgetron: A Kernel-based Perceptron on a Budget", year=2008, type=Journal, publication="SIAM Journal on Computing", pages={1342,1372}, url="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.134.7604&rep=rep1&type=pdf", notes="This is the self-tuned version.") public class Forgetron<InputType> extends AbstractOnlineBudgetedKernelBinaryCategorizerLearner<InputType>
DefaultKernelBinaryCategorizer to keep some extra information about
learning.| Modifier and Type | Class and Description |
|---|---|
static class |
Forgetron.Basic<InputType>
An implementation of the "basic" Forgetron algorithm, which is an online
budgeted kernel binary categorizer learner.
|
static class |
Forgetron.Greedy<InputType>
An implementation of the "greedy" Forgetron algorithm, which is an online
budgeted kernel binary categorizer learner.
|
static class |
Forgetron.Result<InputType>
The result object learned by the
Forgetron, which extends
the DefaultKernelBinaryCategorizer with some additional state
information needed in the update step. |
budget, DEFAULT_BUDGETkernel| Constructor and Description |
|---|
Forgetron()
Creates a new
Forgetron with a null kernel and the default
budget. |
Forgetron(Kernel<? super InputType> kernel,
int budget)
Creates a new
Forgetron with the given kernel and budget. |
| Modifier and Type | Method and Description |
|---|---|
DefaultKernelBinaryCategorizer<InputType> |
createInitialLearnedObject()
Creates a new initial learned object, before any data is given.
|
protected void |
shrink(Forgetron.Result<InputType> result)
Apply the shrinking step of the algorithm.
|
void |
update(DefaultKernelBinaryCategorizer<InputType> target,
InputType input,
boolean label)
Updates the target categorizer based on the given input and its
associated output.
|
getBudget, setBudgetgetKernel, setKernel, updateupdateclone, learn, learn, updateequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclonelearnlearnupdatepublic Forgetron()
Forgetron with a null kernel and the default
budget.public DefaultKernelBinaryCategorizer<InputType> createInitialLearnedObject()
IncrementalLearnercreateInitialLearnedObject in interface IncrementalLearner<InputOutputPair<? extends InputType,java.lang.Boolean>,DefaultKernelBinaryCategorizer<InputType>>createInitialLearnedObject in class AbstractOnlineKernelBinaryCategorizerLearner<InputType>public void update(DefaultKernelBinaryCategorizer<InputType> target, InputType input, boolean label)
AbstractOnlineKernelBinaryCategorizerLearnerupdate in class AbstractOnlineKernelBinaryCategorizerLearner<InputType>target - The target categorizer to update.input - The input value to learn from.label - The output value associated with the input.protected void shrink(Forgetron.Result<InputType> result)
result - The shrinking step.