Skip to content

Instantly share code, notes, and snippets.

@agibsonccc
Created August 27, 2014 02:01
Show Gist options
  • Save agibsonccc/5b34b9b58b407bb779c3 to your computer and use it in GitHub Desktop.
Save agibsonccc/5b34b9b58b407bb779c3 to your computer and use it in GitHub Desktop.
package org.deeplearning4j.nn.api;
import org.deeplearning4j.linalg.api.ndarray.INDArray;
/**
* Created by agibsonccc on 8/26/14.
*/
public interface Classifier {
/**
* Returns the number of possible labels
* @return the number of possible labels for this classifier
*/
int numLabels();
/**
* Takes in a list of examples
* For each row, returns a label
* @param examples the examples to classify (one example in each row)
* @return the labels for each example
*/
int[] predict(INDArray examples);
/**
* Returns the probabilities for each label
* for each example row wise
* @param examples the examples to classify (one example in each row)
* @return the likelihoods of each example and each label
*/
INDArray labelProbabilites(INDArray examples);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment