public class Classifier
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
ClassifierData |
classifierData |
java.util.ArrayList<java.lang.Double> |
validationCumulativeLoss |
| Constructor and Description |
|---|
Classifier() |
| Modifier and Type | Method and Description |
|---|---|
Vector |
getAvgWeights()
a getter for the averaged weights
|
PredictedLabels |
test(Vector W,
Example example,
int returnAll)
predict
|
Vector |
train(Vector W,
InstancesContainer trainInstances,
java.util.List<java.lang.Double> params,
InstancesContainer developInstances,
int isAvg,
boolean verbose)
train the algorithm and return the final weights
|
public ClassifierData classifierData
public java.util.ArrayList<java.lang.Double> validationCumulativeLoss
public Vector train(Vector W, InstancesContainer trainInstances, java.util.List<java.lang.Double> params, InstancesContainer developInstances, int isAvg, boolean verbose) throws java.lang.Exception
W - model weightstrainInstances - training examplesparams - a given parameters for the modeldevelopInstances - development set, if set to null the model skip the validation phaseisAvg - if this parameter set to 1 the function will average the model weights, otherwise it will return only the last onejava.lang.Exceptionpublic PredictedLabels test(Vector W, Example example, int returnAll)
W - the model weightsexample - an example to predictreturnAll - can be used by the inference to return the desired number of examplespublic Vector getAvgWeights()