InputType
- The input type to perform learning over. It is passed to the kernel
function.public class KernelBinaryCategorizerOnlineLearnerAdapter<InputType> extends AbstractOnlineKernelBinaryCategorizerLearner<InputType>
KernelizableBinaryCategorizerOnlineLearner
that allows it to be used as a batch or incremental learner over the
input type directly, rather than using utility methods.Modifier and Type | Field and Description |
---|---|
protected KernelizableBinaryCategorizerOnlineLearner |
learner
The wrapped kernelizable learner.
|
kernel
Constructor and Description |
---|
KernelBinaryCategorizerOnlineLearnerAdapter()
Creates a new
KernelBinaryCategorizerOnlineLearnerAdapter with
a null learner. |
KernelBinaryCategorizerOnlineLearnerAdapter(Kernel<? super InputType> kernel,
KernelizableBinaryCategorizerOnlineLearner learner)
Creates a new
KernelBinaryCategorizerOnlineLearnerAdapter with
the given kernel and learner. |
Modifier and Type | Method and Description |
---|---|
DefaultKernelBinaryCategorizer<InputType> |
createInitialLearnedObject()
Creates a new initial learned object, before any data is given.
|
KernelizableBinaryCategorizerOnlineLearner |
getLearner()
Gets the kernelizable learner that this adapter is wrapping.
|
void |
setLearner(KernelizableBinaryCategorizerOnlineLearner learner)
Sets the kernelizable learner that this adapter is wrapping.
|
void |
update(DefaultKernelBinaryCategorizer<InputType> target,
InputOutputPair<? extends InputType,java.lang.Boolean> data)
The
update method updates an object of ResultType using
the given new data of type DataType , using some form of
"learning" algorithm. |
void |
update(DefaultKernelBinaryCategorizer<InputType> target,
InputType input,
boolean output)
Updates the target categorizer based on the given input and its
associated output.
|
void |
update(DefaultKernelBinaryCategorizer<InputType> target,
InputType 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. |
getKernel, setKernel
clone, learn, learn, update
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
learn
learn
update
protected KernelizableBinaryCategorizerOnlineLearner learner
public KernelBinaryCategorizerOnlineLearnerAdapter()
KernelBinaryCategorizerOnlineLearnerAdapter
with
a null learner.public KernelBinaryCategorizerOnlineLearnerAdapter(Kernel<? super InputType> kernel, KernelizableBinaryCategorizerOnlineLearner learner)
KernelBinaryCategorizerOnlineLearnerAdapter
with
the given kernel and learner.kernel
- The kernel to use.learner
- The kernelizable learner to use.public DefaultKernelBinaryCategorizer<InputType> createInitialLearnedObject()
IncrementalLearner
createInitialLearnedObject
in interface IncrementalLearner<InputOutputPair<? extends InputType,java.lang.Boolean>,DefaultKernelBinaryCategorizer<InputType>>
createInitialLearnedObject
in class AbstractOnlineKernelBinaryCategorizerLearner<InputType>
public void update(DefaultKernelBinaryCategorizer<InputType> target, InputOutputPair<? extends InputType,java.lang.Boolean> data)
IncrementalLearner
update
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 InputType,java.lang.Boolean>,DefaultKernelBinaryCategorizer<InputType>>
update
in class AbstractSupervisedBatchAndIncrementalLearner<InputType,java.lang.Boolean,DefaultKernelBinaryCategorizer<InputType>>
target
- The object to update.data
- The new data for the learning algorithm to use to update
the object.public void update(DefaultKernelBinaryCategorizer<InputType> target, InputType input, java.lang.Boolean output)
SupervisedIncrementalLearner
update
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<InputType,java.lang.Boolean,DefaultKernelBinaryCategorizer<InputType>>
update
in class AbstractOnlineKernelBinaryCategorizerLearner<InputType>
target
- The object to update.input
- The supervised input to learn from.output
- The supervised output to learn from.public void update(DefaultKernelBinaryCategorizer<InputType> target, InputType input, boolean output)
AbstractOnlineKernelBinaryCategorizerLearner
update
in class AbstractOnlineKernelBinaryCategorizerLearner<InputType>
target
- The target categorizer to update.input
- The input value to learn from.output
- The output value associated with the input.public KernelizableBinaryCategorizerOnlineLearner getLearner()
public void setLearner(KernelizableBinaryCategorizerOnlineLearner learner)
learner
- The kernelizable learner that this adapter is wrapping.