"ClassDistributions" (Machine Learning Method)
- Method for Classify.
- Learn a probability distribution for each class to compute class probabilities.
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 option can be given:
Method Automatic method 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.
Examplesopen allclose all
Basic Examples (3)
Train a classifier function on labeled examples:
Obtain information about the classifier:
Obtain specific information about the method used by LearnDistribution:
Generate some normally distributed data:
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:
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: