Package se.hb.jcp.nc

Interface IClassificationNonconformityFunction

    • Method Detail

      • fit

        void fit​(cern.colt.matrix.DoubleMatrix2D x,
                 double[] y)
        Initializes this non-conformity function with the supplied data.
        Parameters:
        x - the instances.
        y - the targets/classes/labels of the instances.
      • fitNew

        IClassificationNonconformityFunction fitNew​(cern.colt.matrix.DoubleMatrix2D x,
                                                    double[] y)
        Returns a new non-conformity function based on the same parameters as the current one initialized with the supplied data.
        Parameters:
        x - the instances.
        y - the targets or classes of the instances.
        Returns:
        a new non-conformity function.
      • fitNew

        IClassificationNonconformityFunction fitNew​(cern.colt.matrix.DoubleMatrix2D xtr,
                                                    double[] ytr,
                                                    cern.colt.matrix.DoubleMatrix1D xtest,
                                                    double ytest)
        Returns a new non-conformity function based on the same parameters as the current one initialized with the supplied data.
        Parameters:
        xtr - the training instances.
        ytr - the training targets or classes of the instances.
        xtest - the test instances.
        ytest - the test targets/classes/labels of the instances.
        Returns:
        a new non-conformity function.
      • calc_nc

        @Deprecated
        double[] calc_nc​(cern.colt.matrix.DoubleMatrix2D x,
                         double[] y)
        Deprecated.
      • calc_nc

        double[] calc_nc​(cern.colt.matrix.DoubleMatrix2D xtrain,
                         double[] ytrain,
                         cern.colt.matrix.DoubleMatrix1D xtest,
                         double ytest)
      • calculateNonConformityScore

        double calculateNonConformityScore​(cern.colt.matrix.DoubleMatrix1D x,
                                           double y)
        Computes the non-conformity score for the instance x with the target y.
        Parameters:
        x - the instance.
        y - the target/class/label.
        Returns:
        the non-conformity score. Large means less conforming.
      • getClassifier

        IClassifier getClassifier()
        Returns the classifier used by this non-conformity function.
        Returns:
        the classifier used by this non-conformity function; or null if there isn't one.