MulticlassPApublic class MulticlassPA extends Object Wrapper for multiclass passive aggressive classifier.
version 1 supports indexed sparse feature only. |
Fields Summary |
---|
private long | nativeClassifier |
Constructors Summary |
---|
public MulticlassPA(int numClasses, int numDimensions, float aggressiveness)
nativeClassifier = initNativeClassifier(numClasses, numDimensions,
aggressiveness);
|
Methods Summary |
---|
private native void | deleteNativeClassifier(long classPtr)
| private native long | initNativeClassifier(int num_classes, int num_dims, float aggressiveness)
| private native int | nativeSparseGetClass(int[] index_array, float[] float_array, long classPtr)
| private native boolean | nativeSparseTrainOneExample(int[] index_array, float[] float_array, int target, long classPtr)
| public int | sparseGetClass(int[] index_array, float[] float_array)Train on one example
return nativeSparseGetClass(index_array, float_array, nativeClassifier);
| public boolean | sparseTrainOneExample(int[] index_array, float[] float_array, int target)Train on one example
return nativeSparseTrainOneExample(
index_array, float_array, target, nativeClassifier);
|
|