public interface Classifier extends Model
Modifier and Type | Method and Description |
---|---|
void |
fit(org.nd4j.linalg.dataset.api.DataSet data)
Fit the model
|
void |
fit(org.nd4j.linalg.dataset.api.DataSet data,
Object[] params)
Fit the model
|
void |
fit(org.nd4j.linalg.api.ndarray.INDArray examples,
org.nd4j.linalg.api.ndarray.INDArray labels)
Fit the model
|
void |
fit(org.nd4j.linalg.api.ndarray.INDArray examples,
org.nd4j.linalg.api.ndarray.INDArray labels,
Object[] params)
Fit the model
|
void |
fit(org.nd4j.linalg.api.ndarray.INDArray examples,
int[] labels)
Fit the model
|
void |
fit(org.nd4j.linalg.api.ndarray.INDArray examples,
int[] labels,
Object[] params)
Fit the model
|
void |
iterate(org.nd4j.linalg.api.ndarray.INDArray examples,
int[] labels,
Object[] params)
Iterate once on the model
|
org.nd4j.linalg.api.ndarray.INDArray |
labelProbabilities(org.nd4j.linalg.api.ndarray.INDArray examples)
Returns the probabilities for each label
for each example row wise
|
int |
numLabels()
Returns the number of possible labels
|
int[] |
predict(org.nd4j.linalg.api.ndarray.INDArray examples)
Takes in a list of examples
For each row, returns a label
|
double |
score()
Assuming an input and labels are already set
will score based on what's already set
|
double |
score(org.nd4j.linalg.dataset.api.DataSet data)
Sets the input and labels and returns a score for the prediction
wrt true labels
|
double |
score(org.nd4j.linalg.api.ndarray.INDArray examples,
org.nd4j.linalg.api.ndarray.INDArray labels)
Returns the f1 score for the given examples.
|
double score()
double score(org.nd4j.linalg.dataset.api.DataSet data)
data
- the data to scoredouble score(org.nd4j.linalg.api.ndarray.INDArray examples, org.nd4j.linalg.api.ndarray.INDArray labels)
examples
- te the examples to classify (one example in each row)labels
- the true labelsint numLabels()
int[] predict(org.nd4j.linalg.api.ndarray.INDArray examples)
examples
- the examples to classify (one example in each row)org.nd4j.linalg.api.ndarray.INDArray labelProbabilities(org.nd4j.linalg.api.ndarray.INDArray examples)
examples
- the examples to classify (one example in each row)void fit(org.nd4j.linalg.api.ndarray.INDArray examples, org.nd4j.linalg.api.ndarray.INDArray labels)
examples
- the examples to classify (one example in each row)labels
- the example labels(a binary outcome matrix)void fit(org.nd4j.linalg.dataset.api.DataSet data)
data
- the data to train onvoid fit(org.nd4j.linalg.api.ndarray.INDArray examples, org.nd4j.linalg.api.ndarray.INDArray labels, Object[] params)
examples
- the examples to classify (one example in each row)labels
- the example labels(a binary outcome matrix)params
- extra parametersvoid fit(org.nd4j.linalg.dataset.api.DataSet data, Object[] params)
data
- the data to train onparams
- extra parametersvoid fit(org.nd4j.linalg.api.ndarray.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 examplevoid fit(org.nd4j.linalg.api.ndarray.INDArray examples, int[] labels, Object[] params)
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 exampleparams
- extra parametersvoid iterate(org.nd4j.linalg.api.ndarray.INDArray examples, int[] labels, Object[] params)
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 exampleparams
- extra parametersCopyright © 2014. All rights reserved.