InputType
- The type of input to learn over. Passed to the kernel function.@PublicationReference(author={"Francesco Orabona","Joseph Keshet","Barbara Caputo"}, title="Bounded Kernel-Based Online Learning", year=2009, type=Journal, publication="Journal of Machine Learning Research", pages={2643,2666}, url="http://portal.acm.org/citation.cfm?id=1755875") public class Projectron<InputType> extends AbstractOnlineKernelBinaryCategorizerLearner<InputType>
Modifier and Type | Class and Description |
---|---|
static class |
Projectron.LinearSoftMargin<InputType>
An implementation of the Projectron++ algorithm, which is an online
kernel binary categorizer learner that has a budget parameter tuned by
the eta parameter.
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ETA
The default value of eta is 0.01.
|
protected double |
eta
The eta parameter, which ends up controlling the number of supports
created.
|
kernel
Constructor and Description |
---|
Projectron()
Creates a new
Projectron with a null kernel and default
parameters. |
Projectron(Kernel<? super InputType> kernel)
Creates a new
Projectron with the given kernel and default
parameters. |
Projectron(Kernel<? super InputType> kernel,
double eta)
Creates a new
Projectron with the given parameters. |
Modifier and Type | Method and Description |
---|---|
protected void |
applyUpdate(DefaultKernelBinaryCategorizer<InputType> target,
InputType input,
double actual,
double margin,
double kernelInputInput,
double delta,
Vector d)
Apply the update for the Projectron.
|
double |
getEta()
Gets the eta parameter that controls how many supports are allowed.
|
void |
setEta(double eta)
Sets the eta parameter that controls how many supports are allowed.
|
protected boolean |
shouldUpdate(double margin)
Determine if an update should be made.
|
void |
update(DefaultKernelBinaryCategorizer<InputType> target,
InputType input,
boolean label)
Updates the target categorizer based on the given input and its
associated output.
|
createInitialLearnedObject, getKernel, setKernel, update
update
clone, learn, learn, update
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
learn
learn
update
public static final double DEFAULT_ETA
protected double eta
public Projectron()
Projectron
with a null kernel and default
parameters.public Projectron(Kernel<? super InputType> kernel)
Projectron
with the given kernel and default
parameters.kernel
- The kernel to use.public void update(DefaultKernelBinaryCategorizer<InputType> target, InputType input, boolean label)
AbstractOnlineKernelBinaryCategorizerLearner
update
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 boolean shouldUpdate(double margin)
margin
- The margin.protected void applyUpdate(DefaultKernelBinaryCategorizer<InputType> target, InputType input, double actual, double margin, double kernelInputInput, double delta, Vector d)
target
- The target to update.input
- The input value.actual
- The actual label.margin
- The margin on the input.kernelInputInput
- The kernel function k(input, input).delta
- The value delta computed by the Projectron.d
- The vector d that represents the coefficients for the projection.public double getEta()
public void setEta(double eta)
eta
- The eta parameter. Cannot be negative.