public class SVMCompute extends BaseCompute
Constructor and Description |
---|
SVMCompute(BinaryBatchModel binaryBatchModel,
OperationMode operationMode) |
SVMCompute(OperationMode operationMode) |
Modifier and Type | Method and Description |
---|---|
void |
batchTraining()
This method is used to do batch mode training *
|
boolean |
execute(IMessage content)
Execute with an incoming message
|
void |
initializeBatchMode()
This method initializes the parameters needed to run the batch mode algorithm
This method is called per a received batch
|
void |
initializeBinaryModel(double[][] xy)
Binary Model is updated with received batch data
|
void |
initializeBinaryModel(double[][] xy,
int iterations,
double alpha)
Deprecated.
must be initialized before main initialization
|
void |
initializeStreamMode()
This method can be initialized when constructor is initialized *
|
void |
onlineTraining(double[] x1,
double y1)
This method can be used to do the online training
Upon the receiving IMessage with a double [] = {y_i, x_i1, ...x_id}
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
endExecute
public SVMCompute(OperationMode operationMode)
public SVMCompute(BinaryBatchModel binaryBatchModel, OperationMode operationMode)
public boolean execute(IMessage content)
ICompute
public void onlineTraining(double[] x1, double y1)
x1
- data point with d elementsy1
- label an integer [-1, +1] for binary classificationpublic void batchTraining()
public void initializeStreamMode()
public void initializeBatchMode()
@Deprecated public void initializeBinaryModel(double[][] xy, int iterations, double alpha)
public void initializeBinaryModel(double[][] xy)
xy
- data points included with label and features