public interface Classifier extends Model
Modifier and Type | Method and Description |
---|---|
double |
f1Score(DataSet data)
Sets the input and labels and returns a score for the prediction
wrt true labels
|
double |
f1Score(INDArray examples,
INDArray labels)
Returns the f1 score for the given examples.
|
void |
fit(DataSet data)
Fit the model
|
void |
fit(DataSetIterator iter)
Train the model based on the datasetiterator
|
void |
fit(INDArray examples,
INDArray labels)
Fit the model
|
void |
fit(INDArray examples,
int[] labels)
Fit the model
|
int |
numLabels()
Deprecated.
Will be removed in a future release
|
List<String> |
predict(DataSet dataSet)
Takes in a DataSet of examples
For each row, returns a label
|
int[] |
predict(INDArray examples)
Takes in a list of examples
For each row, returns a label
|
addListeners, applyConstraints, batchSize, clear, close, computeGradientAndScore, conf, fit, fit, getGradientsViewArray, getOptimizer, getParam, gradient, gradientAndScore, init, input, numParams, numParams, params, paramTable, paramTable, score, setBackpropGradientsViewArray, setConf, setListeners, setListeners, setParam, setParams, setParamsViewArray, setParamTable, update, update
double f1Score(DataSet data)
data
- the data to scoredouble f1Score(INDArray examples, INDArray labels)
examples
- te the examples to classify (one example in each row)labels
- the true labels@Deprecated int numLabels()
void fit(DataSetIterator iter)
iter
- the iterator to train onint[] predict(INDArray examples)
examples
- the examples to classify (one example in each row)List<String> predict(DataSet dataSet)
dataSet
- the examples to classifyvoid fit(INDArray examples, INDArray labels)
examples
- the examples to classify (one example in each row)labels
- the example labels(a binary outcome matrix)void fit(DataSet data)
data
- the data to train onvoid fit(INDArray examples, int[] labels)
examples
- the examples to classify (one example in each row)labels
- the labels for each example (the number of labels must match
the number of rows in the exampleCopyright © 2021. All rights reserved.