E
- the class of the data sampleL
- the class of the labels for each data samplepublic abstract class MulticlassMethod<E,L extends java.lang.Comparable<L>>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
MulticlassMethod(OnlineEngine.Conf<E> conf)
Creates a multi-class method by storing the OnlineEngine.Conf
|
Modifier and Type | Method and Description |
---|---|
abstract L |
getResult(DataObject<E> instance)
Classifies a data instance with a label
|
abstract void |
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.
|
public MulticlassMethod(OnlineEngine.Conf<E> conf)
conf
- the OnlineEngine.Conf object that stores the parameters
and can create OnlineEnginespublic abstract void train(java.util.List<DataObject<E>> trainingData, java.util.List<L> labelsData, int iterations, boolean cacheMatrix, java.util.List<EngineObserver<E>> engineObservers)
trainingData
- the data instances from the training datalabelsData
- the labels for the data instancesiterations
- the number of iterations to train each OnlineEngine
neededcacheMatrix
- a boolean that defines the use of a Cache based on a matrixengineObservers
- a list of EngineOverver objects that will receive
information in each step of the algorithm that trains the OnlineEnginespublic abstract L getResult(DataObject<E> instance)
instance
- the data instance object