InputType
- The input type to perform learning on, which is passed to the kernel
function.public class OnlineKernelPerceptron<InputType> extends AbstractOnlineKernelBinaryCategorizerLearner<InputType>
kernel
Constructor and Description |
---|
OnlineKernelPerceptron()
Creates a new
OnlineKernelPerceptron with no kernel. |
OnlineKernelPerceptron(Kernel<? super InputType> kernel)
Creates a new
OnlineKernelPerceptron with the given kernel. |
Modifier and Type | Method and Description |
---|---|
void |
update(DefaultKernelBinaryCategorizer<InputType> target,
InputType input,
boolean label)
Updates the target categorizer based on the given input and its
associated output.
|
static <InputType> |
update(DefaultKernelBinaryCategorizer<InputType> target,
InputType input,
boolean label,
boolean updateBias)
Performs a Perceptron update step on the given target.
|
createInitialLearnedObject, getKernel, setKernel, update
update
clone, learn, learn, update
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
learn
learn
update
public OnlineKernelPerceptron()
OnlineKernelPerceptron
with no kernel.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.public static <InputType> boolean update(DefaultKernelBinaryCategorizer<InputType> target, InputType input, boolean label, boolean updateBias)
InputType
- The input type to the kernel.target
- The kernel binary categorizer to update using the Perceptron update
step.input
- The input value.label
- The label associated with the input.updateBias
- True to update the bias term. False to leave it the same.