"ClassDistributions" (Machine Learning Method)

Details & Suboptions

  • The "ClassDistribution" method learns a probability distribution for each class by applying LearnDistribution on the examples of this class. When given a new example to classify, the class probabilities of the example are computed by measuring the probability density function (PDF) of the example for each class distribution. More precisely, the probabilities are computed using Bayes's theorem , where x is the example to classify, is the prior probability of the class, and is the PDF of x for the class distribution.
  • The following options can be given:
  • MethodAutomaticmethod to be used by LearnDistribution
  • In Methodmethod, method can be any method of LearnDistribution, possibly with options and suboption specifications.
  • Classify[,AnomalyDetectorInherited] can be used to use the implicit mixture distribution learned by this method in order to detect an anomalous example.

Examples

open allclose all

Basic Examples  (3)

Train a classifier function on labeled examples:

Classify a new example:

Obtain probabilities:

Obtain information about the classifier:

Obtain specific information about the method used by LearnDistribution:

Generate some normally distributed data:

Visualize it:

Train a classifier on this dataset:

Plot the training set and the probability distribution of each class as a function of the features:

Train a classifier and specify that the anomaly detector should be inherited from the "ClassDistributions" method:

Classify a new example:

Classify a new example that is anomalous:

Options  (1)

Method  (1)

Train a classifier function and specify that the "KernelDensityEstimation" method of LearnDistribution should be used:

Obtain the class probabilities for a new example:

Train another classifier and specify some options of the "KernelDensityEstimation" method:

Obtain the class probabilities for a new example: