Interface Classifier

    • Method Detail

      • f1Score

        double f1Score​(DataSet data)
        Sets the input and labels and returns a score for the prediction wrt true labels
        Parameters:
        data - the data to score
        Returns:
        the score for the given input,label pairs
      • f1Score

        double f1Score​(INDArray examples,
                       INDArray labels)
        Returns the f1 score for the given examples. Think of this to be like a percentage right. The higher the number the more it got right. This is on a scale from 0 to 1.
        Parameters:
        examples - te the examples to classify (one example in each row)
        labels - the true labels
        Returns:
        the scores for each ndarray
      • numLabels

        @Deprecated
        int numLabels()
        Deprecated.
        Will be removed in a future release
        Returns the number of possible labels
        Returns:
        the number of possible labels for this classifier
      • fit

        void fit​(DataSetIterator iter)
        Train the model based on the datasetiterator
        Parameters:
        iter - the iterator to train on
      • predict

        int[] predict​(INDArray examples)
        Takes in a list of examples For each row, returns a label
        Parameters:
        examples - the examples to classify (one example in each row)
        Returns:
        the labels for each example
      • predict

        List<String> predict​(DataSet dataSet)
        Takes in a DataSet of examples For each row, returns a label
        Parameters:
        dataSet - the examples to classify
        Returns:
        the labels for each example
      • fit

        void fit​(INDArray examples,
                 INDArray labels)
        Fit the model
        Parameters:
        examples - the examples to classify (one example in each row)
        labels - the example labels(a binary outcome matrix)
      • fit

        void fit​(DataSet data)
        Fit the model
        Parameters:
        data - the data to train on
      • fit

        void fit​(INDArray examples,
                 int[] labels)
        Fit the model
        Parameters:
        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 example