Modifier and Type | Method and Description |
---|---|
java.util.Map<DataObject<E>,java.lang.Double> |
KernelBinaryOnlineAlgorithm.getWeights()
Used for SVM based OnlineEngine, it returns the weights for the Support
Vectors
|
Modifier and Type | Method and Description |
---|---|
void |
KernelBinaryOnlineAlgorithm.addExampleAndUpdate(DataObject<E> inputVector,
boolean desiredOutput)
Trains the OnlineEngine with a data sample
|
boolean |
KernelBinaryOnlineAlgorithm.classify(DataObject<E> vector)
Assigns a binary label to a data sample
|
Constructor and Description |
---|
KernelBinaryOnlineAlgorithm(java.util.List<DataObject<E>> trainingData,
java.util.Map<java.lang.Integer,java.lang.Boolean> labels,
int currentEpoch,
int numEpochs,
OnlineEngine<E> engine,
boolean cacheMatrix,
java.util.List<EngineObserver<E>> observers,
java.lang.String classifier)
Calls the training for the OnlineEngine
|
KernelBinaryOnlineAlgorithm(java.util.List<DataObject<E>> trainingData,
java.util.Map<java.lang.Integer,java.lang.Boolean> labels,
int numEpochs,
OnlineEngine<E> engine,
boolean cacheMatrix,
java.util.List<EngineObserver<E>> observers,
java.lang.String classifier)
Calls the training for the OnlineEngine
|
Modifier and Type | Method and Description |
---|---|
DataObject<E> |
KernelPegasosEngine.convertVector(DataObject<E> x) |
DataObject<E> |
OnlineEngine.convertVector(DataObject<E> x)
Transforms a DataObject into another DataObject with modifications
to be in the right format for this engine
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<DataObject<E>,java.lang.Double> |
KernelPegasosEngine.getWeights()
Gets the weights for each SV (Support Vector) in this model
SV is a data instance with non-zero weight, it is used to compose this model
|
Modifier and Type | Method and Description |
---|---|
DataObject<E> |
KernelPegasosEngine.convertVector(DataObject<E> x) |
DataObject<E> |
OnlineEngine.convertVector(DataObject<E> x)
Transforms a DataObject into another DataObject with modifications
to be in the right format for this engine
|
boolean |
KernelPegasosEngine.getResult(DataObject<E> vector) |
boolean |
OnlineEngine.getResult(DataObject<E> vector)
Uses this online model to predict the label for a data
instance of type E encapsulated by a DataObject
|
double |
KernelPegasosEngine.getScore(DataObject<E> vector) |
double |
OnlineEngine.getScore(DataObject<E> vector)
Gets the certainty score of this model prediction for a data instance of type E
|
boolean |
KernelPegasosEngine.updateModel(DataObject<E>[] inputVectors,
boolean[] desiredOutputs)
Adds a new array of data instance to this online model.
|
boolean |
KernelPegasosEngine.updateModel(DataObject<E> inputVector,
boolean desiredOutput) |
boolean |
OnlineEngine.updateModel(DataObject<E> inputVector,
boolean desiredOutput)
Adds a new data instance to this online model.
|
Modifier and Type | Method and Description |
---|---|
void |
KernelPegasosEngine.Conf.cacheMatrix(java.util.List<DataObject<E1>> trainingData) |
void |
OnlineEngine.Conf.cacheMatrix(java.util.List<DataObject<E1>> trainingData)
Creates a Cache based on a matrix stored memory for Kernels
This type of cache occupies less memory and it provides fast access,
the draw back is that to create this matrix, the method computes
the kernel for every pair of data instance
|
double |
KernelPegasosEngine.objectiveValue(java.util.List<DataObject<E>> trainingData,
java.util.Map<java.lang.Integer,java.lang.Boolean> desiredLabels)
Computes the objective function value for the provided labelled data
samples
|
Modifier and Type | Method and Description |
---|---|
abstract DataObject<E> |
Kernel.convertVector(DataObject<E> x)
Transforms a DataObject into another DataObject with modifications
to be in the right format for this kernel
|
DataObject<E> |
ComputedKernel.convertVector(DataObject<E> x) |
DataObject<java.util.Map<java.lang.Integer,java.lang.Double>> |
GaussianKernel.convertVector(DataObject<java.util.Map<java.lang.Integer,java.lang.Double>> x) |
DataObject<java.util.Map<java.lang.Long,java.lang.Double>> |
LinearKernel.convertVector(DataObject<java.util.Map<java.lang.Long,java.lang.Double>> x) |
Modifier and Type | Method and Description |
---|---|
double |
Kernel.compute(DataObject<E> x1,
DataObject<E> x2)
Computes the kernel value for two data instances
|
double |
Kernel.compute(DataObject<E> x1,
DataObject<E> x2)
Computes the kernel value for two data instances
|
abstract DataObject<E> |
Kernel.convertVector(DataObject<E> x)
Transforms a DataObject into another DataObject with modifications
to be in the right format for this kernel
|
DataObject<E> |
ComputedKernel.convertVector(DataObject<E> x) |
DataObject<java.util.Map<java.lang.Integer,java.lang.Double>> |
GaussianKernel.convertVector(DataObject<java.util.Map<java.lang.Integer,java.lang.Double>> x) |
DataObject<java.util.Map<java.lang.Long,java.lang.Double>> |
LinearKernel.convertVector(DataObject<java.util.Map<java.lang.Long,java.lang.Double>> x) |
Modifier and Type | Method and Description |
---|---|
Kernel<E> |
Kernel.computeKernelMatrix(java.util.List<DataObject<E>> samples)
Creates a matrix to be used for caching purposes.
|
Kernel<E> |
Kernel.computeKernelMatrix(java.util.List<DataObject<E>> samples,
java.util.Map<java.lang.Integer,java.lang.Integer> conversorId)
Creates a matrix to be used for caching purposes.
|
Modifier and Type | Method and Description |
---|---|
abstract L |
MulticlassMethod.getResult(DataObject<E> instance)
Classifies a data instance with a label
|
L |
OneVsAllMulticlassMethod.getResult(DataObject<E> instance) |
Modifier and Type | Method and Description |
---|---|
abstract void |
MulticlassMethod.train(java.util.List<DataObject<E>> trainingData,
java.util.List<L> labelsData,
int iterations,
boolean cacheMatrix,
java.util.List<EngineObserver<E>> engineObservers)
Trains the multi-class method using the training data instances and their
labels.
|
void |
OneVsAllMulticlassMethod.train(java.util.List<DataObject<E>> trainingData,
java.util.List<L> labelsData,
int iterations,
boolean cacheMatrix,
java.util.List<EngineObserver<E>> engineObservers) |
Modifier and Type | Method and Description |
---|---|
int |
DataObject.compareTo(DataObject<E> o) |