Documentation of 'jsat.classifiers.bayesian.BestClassDistribution' Java class
BestClassDistribution
jsat.classifiers.bayesian

Class BestClassDistribution

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


    public class BestClassDistribution
    extends java.lang.Object
    implements Classifier, Parameterized
    BestClassDistribution is a generic class for performing classification by fitting a MultivariateDistribution to each class. The distribution is supplied by the user, and each class if fit to the same type of distribution. Classification is then performed by returning the class of the most likely distribution given the data point.
    See Also:
    Serialized Form
    • Field Detail

      • USE_PRIORS

        public static final boolean USE_PRIORS
        The default value for whether or not to use the prior probability of a class when making classification decisions is true.
        See Also:
        Constant Field Values
    • Method Detail

      • setUsePriors

        public void setUsePriors(boolean usePriors)
        Controls whether or not the priors will be used for classification. This value can be changed at any time, before or after training has occurred.
        Parameters:
        usePriors - true to use the prior probabilities for each class, false to ignore them.
      • isUsePriors

        public boolean isUsePriors()
        Returns whether or not this object uses the prior probabilities for classification.
        Returns:
        true if the prior probabilities are being used, false if not.
      • 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

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.