Class SVMClassifier

    • Constructor Detail

      • SVMClassifier

        public SVMClassifier()
      • SVMClassifier

        public SVMClassifier​(org.json.JSONObject parameters)
      • SVMClassifier

        public SVMClassifier​(svm_parameter parameters)
    • Method Detail

      • internalFit

        protected void internalFit​(cern.colt.matrix.DoubleMatrix2D x,
                                   double[] y)
        Specified by:
        internalFit in class ClassifierBase
      • fitNew

        public IClassifier fitNew​(cern.colt.matrix.DoubleMatrix2D x,
                                  double[] y)
        Description copied from interface: IClassifier
        Trains and returns a copy of this classifier using the supplied data.
        Specified by:
        fitNew in interface IClassifier
        Parameters:
        x - the attributes of the instances.
        y - the targets of the instances.
        Returns:
        a new IClassifier instance trained with the supplied data and using the same algorithm and parameter settings as the parent instance.
      • predict

        public double predict​(cern.colt.matrix.DoubleMatrix1D instance)
        Description copied from interface: IClassifier
        Predicts the target for the supplied instance.
        Specified by:
        predict in interface IClassifier
        Parameters:
        instance - the instance
        Returns:
        the predicted target of the instance.
      • predict

        public double predict​(cern.colt.matrix.DoubleMatrix1D instance,
                              double[] probabilityEstimates)
        Description copied from interface: IClassProbabilityClassifier
        Predicts the target probabilities for the supplied instance.
        Specified by:
        predict in interface IClassProbabilityClassifier
        Parameters:
        instance - the instance
        probabilityEstimates - a double[] array for storing the predicted probabilities for each of target values in the order assumed by JCP.
        Returns:
        the predicted target of the instance.
      • distanceFromSeparatingPlane

        public double distanceFromSeparatingPlane​(cern.colt.matrix.DoubleMatrix1D instance)
        Returns the signed distance between the separating hyperplane and the instance.
        Specified by:
        distanceFromSeparatingPlane in interface ISVMClassifier
        Parameters:
        instance - the instance.
        Returns:
        the signed distance between the separating hyperplane and the instance.
      • nativeStorageTemplate

        public cern.colt.matrix.DoubleMatrix1D nativeStorageTemplate()
        Description copied from interface: IClassifierInformation
        Returns a value of the DoubleMatrix1D derived class that is the native storage format for the classifier.
        Specified by:
        nativeStorageTemplate in interface IClassifierInformation
        Returns:
        a value of the DoubleMatrix1D derived class of the native storage format for the classifier.