Methods Summary |
---|
public int | Classify(java.util.List sample)
IntFloatArray splited = splitIntFloatArray(sample);
int prediction = mMulticlassPA_learner.sparseGetClass(splited.indexArray,
splited.floatArray);
return prediction;
|
public void | TrainOneSample(java.util.List sample, int target)
IntFloatArray splited = splitIntFloatArray(sample);
mMulticlassPA_learner.sparseTrainOneExample(splited.indexArray,
splited.floatArray,
target);
if (modelChangeCallback != null) {
modelChangeCallback.modelChanged(this);
}
|
public android.os.IBinder | getBinder()
return this;
|
public byte[] | getModel()
return null;
|
public boolean | setModel(byte[] modelData)
return false;
|
public void | setModelChangeCallback(ModelChangeCallback callback)
modelChangeCallback = callback;
|
private android.bordeaux.services.Learning_MulticlassPA$IntFloatArray | splitIntFloatArray(java.util.List sample)
IntFloatArray splited = new IntFloatArray();
ArrayList<IntFloat> s = (ArrayList<IntFloat>)sample;
splited.indexArray = new int[s.size()];
splited.floatArray = new float[s.size()];
for (int i = 0; i < s.size(); i++) {
splited.indexArray[i] = s.get(i).index;
splited.floatArray[i] = s.get(i).value;
}
return splited;
|