Documentation of 'jsat.classifiers.OneVSOne' Java class
OneVSOne
jsat.classifiers

Class OneVSOne

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Classifier, Parameterized
    Direct Known Subclasses:
    DDAG


    public class OneVSOne
    extends java.lang.Object
    implements Classifier, Parameterized
    A One VS One classifier extends binary decision classifiers into multi-class decision classifiers. This is done by creating a binary-classification problem for every possible pair of classes, and then classifying by taking the result of all possible combinations and choosing the class that got the most results. This allows for a soft decision result, however, it often proves to be a meaningless soft boundary.
    See Also:
    Serialized Form
    • Constructor Detail

      • OneVSOne

        public OneVSOne(Classifier baseClassifier)
        Creates a new One-vs-One classifier
        Parameters:
        baseClassifier - the binary classifier to extend
      • OneVSOne

        public OneVSOne(Classifier baseClassifier,
                        boolean concurrentTrain)
        Creates a new One-vs-One classifier
        Parameters:
        baseClassifier - the binary classifier to extend
        concurrentTrain - true to have training of individual classifiers occur in parallel, false to have them use their native parallel training method.
    • Method Detail

      • setConcurrentTraining

        public void setConcurrentTraining(boolean concurrentTrain)
        Controls whether or not training of the several classifiers occurs concurrently or sequentually.
        Parameters:
        concurrentTrain - true to have training of individual classifiers occur in parallel, false to have them use their native parallel training method.
      • isConcurrentTraining

        public boolean isConcurrentTraining()
        Returns:
        true if training of individual classifiers occur in parallel, false they use their native parallel training method.
      • 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
      • clone

        public OneVSOne clone()
        Specified by:
        clone in interface Classifier
        Overrides:
        clone in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.