Documentation of 'jsat.classifiers.svm.SVMnoBias' Java class
SVMnoBias
jsat.classifiers.svm

Class SVMnoBias

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, BinaryScoreClassifier, Classifier


    public class SVMnoBias
    extends SupportVectorLearner
    implements BinaryScoreClassifier
    This class implements a version of the Support Vector Machine without a bias term. In addition, the current implementation requires that the Kernel Trick used be a normalized kernel. If the given kernel is not normalized, this class will automatically wrap it to become normalized.

    Because there is no bias term, this class should never be used with the Linear kernel. But for the more common RBF kernel the lack of bias term should have minimal impact on accuracy.

    See: Steinwart, I., Hush, D., & Scovel, C. (2011). Training SVMs Without Offset. The Journal of Machine Learning Research, 12, 141–202.
    See Also:
    Serialized Form
    • Constructor Detail

      • SVMnoBias

        public SVMnoBias(KernelTrick kf)
        Creates a new SVM object that uses no cache mode.
        Parameters:
        kf - the kernel trick to use
      • SVMnoBias

        public SVMnoBias(SVMnoBias toCopy)
    • Method Detail

      • getScore

        public double getScore(DataPoint dp)
        Description copied from interface: BinaryScoreClassifier
        Returns the numeric score for predicting a class of a given data point, where the sign of the value indicates which class the data point is predicted to belong to.
        Specified by:
        getScore in interface BinaryScoreClassifier
        Parameters:
        dp - the data point to predict the class label of
        Returns:
        the score for the given data point
      • classify

        public CategoricalResults classify(DataPoint data)
        Description copied from interface: Classifier
        Performs classification on the given data point.
        Specified by:
        classify in interface Classifier
        Parameters:
        data - the data point to classify
        Returns:
        the results of the classification.
      • train

        public void train(ClassificationDataSet dataSet,
                          boolean parallel)
        Description copied from interface: Classifier
        Trains the classifier and constructs a model for classification using the given data set. If the training method knows how, it will used the threadPool to conduct training in parallel. This method will block until the training has completed.
        Specified by:
        train in interface Classifier
        Parameters:
        dataSet - the data set to train on
        parallel - true if multiple threads should be used to train the model. false if it should be done in a single threaded manner.
      • supportsWeightedData

        public boolean supportsWeightedData()
        Description copied from interface: Classifier
        Indicates whether the model knows how to train using weighted data points. If it does, the model will train assuming the weights. The values returned by this method may change depending on the parameters set for the model.
        Specified by:
        supportsWeightedData in interface Classifier
        Returns:
        true if the model supports weighted data, false otherwise
      • setC

        public void setC(double C)
        Sets the complexity parameter of SVM. The larger the C value the harder the margin SVM will attempt to find. Lower values of C allow for more misclassification errors.
        Parameters:
        C - the soft margin parameter
      • getC

        public double getC()
        Returns the soft margin complexity parameter of the SVM
        Returns:
        the complexity parameter of the SVM
      • setTolerance

        public void setTolerance(double tolerance)
        Sets the tolerance for the solution. Higher values converge to worse solutions, but do so faster
        Parameters:
        tolerance - the tolerance for the solution
      • getTolerance

        public double getTolerance()
        Returns the solution tolerance
        Returns:
        the solution tolerance

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.