public abstract class AbstractOnlineLinearBinaryCategorizerLearner extends AbstractSupervisedBatchAndIncrementalLearner<Vectorizable,java.lang.Boolean,LinearBinaryCategorizer> implements VectorFactoryContainer
LinearBinaryCategorizer. It implements common functionality,
such as keeping track of the vector factory to use and creating the initial
linear binary categorizer object.| Modifier and Type | Field and Description |
|---|---|
protected VectorFactory<?> |
vectorFactory
The factory to create weight vectors.
|
| Constructor and Description |
|---|
AbstractOnlineLinearBinaryCategorizerLearner()
Creates a new
AbstractOnlineLinearBinaryCategorizerLearner with
the default vector factory. |
AbstractOnlineLinearBinaryCategorizerLearner(VectorFactory<?> vectorFactory)
Creates a new
AbstractOnlineLinearBinaryCategorizerLearner with
the given vector factory. |
| Modifier and Type | Method and Description |
|---|---|
LinearBinaryCategorizer |
createInitialLearnedObject()
Creates a new initial learned object, before any data is given.
|
VectorFactory<?> |
getVectorFactory()
Gets the VectorFactory used to create the weight vector.
|
void |
setVectorFactory(VectorFactory<?> vectorFactory)
Sets the VectorFactory used to create the weight vector.
|
abstract void |
update(LinearBinaryCategorizer target,
Vector input,
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. |
void |
update(LinearBinaryCategorizer target,
Vectorizable 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. |
updateclone, learn, learn, updateequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlearnlearnupdatecloneprotected VectorFactory<?> vectorFactory
public AbstractOnlineLinearBinaryCategorizerLearner()
AbstractOnlineLinearBinaryCategorizerLearner with
the default vector factory.public AbstractOnlineLinearBinaryCategorizerLearner(VectorFactory<?> vectorFactory)
AbstractOnlineLinearBinaryCategorizerLearner with
the given vector factory.vectorFactory - The vector factory to use.public LinearBinaryCategorizer createInitialLearnedObject()
IncrementalLearnercreateInitialLearnedObject in interface IncrementalLearner<InputOutputPair<? extends Vectorizable,java.lang.Boolean>,LinearBinaryCategorizer>public void update(LinearBinaryCategorizer target, Vectorizable input, java.lang.Boolean output)
SupervisedIncrementalLearnerupdate 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<Vectorizable,java.lang.Boolean,LinearBinaryCategorizer>target - The object to update.input - The supervised input to learn from.output - The supervised output to learn from.public abstract void update(LinearBinaryCategorizer target, Vector input, boolean output)
update method updates an object of ResultType using
the given a new supervised input-output pair, using some form of
"learning" algorithm.target - The object to update.input - The supervised input vector to learn from.output - The supervised output label to learn from.public VectorFactory<?> getVectorFactory()
getVectorFactory in interface VectorFactoryContainerpublic void setVectorFactory(VectorFactory<?> vectorFactory)
vectorFactory - The VectorFactory used to create the weight vector.