E
- the class of the data objects used in the modelpublic interface OnlineEngine<E>
extends java.io.Serializable
Modifier and Type | Interface and Description |
---|---|
static interface |
OnlineEngine.Conf<E1>
The interface OnlineEngine.Conf specifies the parameters to
create an OnlineEngine object, this class is mainly intended to define
the behaviour of an OnlineEngine and reproduce it for solutions that
need to replicate OnlineEngines with the same initial properties.
|
Modifier and Type | Method and Description |
---|---|
void |
compileModel()
Calls the finishing procedures after the training of this Online Engine.
|
DataObject<E> |
convertVector(DataObject<E> x)
Transforms a DataObject into another DataObject with modifications
to be in the right format for this engine
|
boolean |
getResult(DataObject<E> vector)
Uses this online model to predict the label for a data
instance of type E encapsulated by a DataObject
|
double |
getScore(DataObject<E> vector)
Gets the certainty score of this model prediction for a data instance of type E
|
void |
start()
Calls the initial procedures, before starting using the Online Engine for training.
|
boolean |
updateModel(DataObject<E> inputVector,
boolean desiredOutput)
Adds a new data instance to this online model.
|
boolean updateModel(DataObject<E> inputVector, boolean desiredOutput)
inputVector
- the data instance of type E encapsulated by a DataObjectdesiredOutput
- a boolean indicating the true label for the data
instance at inputVectorboolean getResult(DataObject<E> vector)
vector
- an input DataObject to be predictedDataObject<E> convertVector(DataObject<E> x) throws InvalidVectorIndexException
x
- a DataObject that encapsulates the data instance to be
transformedInvalidVectorIndexException
- when the DataObject to be transformed
has occupied reserved constantsvoid compileModel()
compileModel is mainly intended to reduce the model size, that is compile the model
void start()
double getScore(DataObject<E> vector)
vector
- the data instance that will it receive the score