• Aucun résultat trouvé

Analyse Discriminante

N/A
N/A
Protected

Academic year: 2022

Partager "Analyse Discriminante"

Copied!
16
0
0

Texte intégral

(1)

Classification

Generative Modeling

Ana Karina Fermin

ISEFAR

http://fermin.perso.math.cnrs.fr/

(2)

Ouline:

1 k Nearest-Neighbors X

2 K-Fold cross validation, Model selection X

3 Generative Modeling (Naive Bayes, LDA, QDA)

4 Logistic Modeling

5 SVM

6 Tree Based Methods (M. Zetlaoui course, Apprentissage)

(3)

Generative Modeling

Bayes formula

pk(x) = P{X=x|Y =k}P{Y =k}

P{X=x}

Remark: If one knowsthe law of (X,Y) or equivalently ofX giveny and of Y then everything is easy!

Binary Bayes classifier (the best solution)

f(x) =

(+1 ifp+1(x)p−1(x)

−1 otherwise

Heuristic: Estimate those quantities and plug the estimations.

By using different models for P{X|Y}, we get different classifiers.

Remark: You can also use your favorite density estimator...

(4)

Discriminant Analysis

Discriminant Analysis (Gaussian model)

The densities are modeled as multivariate normal, i.e., P{X|Y =k} ∼ Nµkk

Discriminants fonctions:

gk(x) = ln(P{X|Y =k}) + ln(P{Y =k}) gk(x) =−1

2(x−µk)tΣ−1k (x−µk)

d

2ln(2π)−1

2ln(|Σk|) + ln(P{Y =k}) QDA (differents Σk in each class) and LDA (Σk = Σ for all k) Beware: this model can be false but the methodology remains valid!

(5)

Discriminant Analysis

Two-dimensional two-category classifier

The probability densities are Gaussian

The effect of any decision rule is to divide the feature space into c decision regions (ici c=2) R1,R2, . . . ,Rc

The regions ared separated by decision boundaries

(6)

Discriminant Analysis

Two-dimensional four-category classifier

(7)

Discriminant Analysis

Estimation

In pratice, we will need to estimateµk, Σk andPk :=P{Y =k}

The estimate proportionPck = nnk = 1nPni=11{Yi=k}

Maximum likelihood estimate of µck andΣck (explicit formulas) DA classifier

bfDA(x) =

(+1 ifbg+1 gb−1

−1 otherwise

Decision boundaries: quadratic = degree 2 polynomials.

If one imposes Σ−1= Σ1 = Σ then the decision boundaries is an linear hyperplan

(8)

Discriminant Analysis

Σω1 = Σω2 = Σ

The decision boundaries is an linear hyperplan

(9)

Discriminant Analysis

Σω1 6= Σω2

Arbitrary Gaussian distributions lead to Bayes decision boundaries that are general quadratics.

(10)

Example: TwoClass Dataset

Synthetic Dataset

Two features/covariates.

Two classes.

Dataset from Applied Predictive Modeling, M. Kuhn and K.

Johnson, Springer

Numerical experiments withR.

(11)

Example: LDA

(12)

Example: QDA

(13)

Naive Bayes

Naive Bayes

Classical algorithm using a crude modeling for P{X|Y}:

Featureindependenceassumption:

P{X|Y}=

d

Y

i=1

P n

X(i) Yo

Simple featurewise model: binomial if binary, multinomial if finite and Gaussian if continuous

If all features are continuous, similar to the previous Gaussian but with a diagonal covariance matrix!

Very simple learning even invery high dimension!

(14)

Naive Bayes with density estimation

(15)

Example: Naive Bayes

(16)

Example: Naive Bayes

Références

Documents relatifs

The sparse regularized likelihood being non convex, we propose an online gradient algorithm using mini-batches and a post- optimization to avoid local minima.. In our experiments we

The paper is organized as follow: our graphical model and the way to compute its parameters (the weights) are presented in section 2 ; the section 3 presents how the conditional

The results show that ranking dictionaries performs better with small training corpora whose language distribution is similar to that of the test dataset, while a Naive Bayes

We consider a density model S for s that we endow with a prior distri- bution π (with support in S) and build a robust alternative to the classical Bayes posterior distribution

The SMDC is mainly based on two simplifying hypothesis that allow to ease the estimation of the parameters of the model, by relaxing the dependence assumption between the

Abstract. In this work a novel ensemble technique for generating ran- dom decision forests is presented. The proposed technique incorporates a Naive Bayes classification model

This paper investigates classification models which can model the burstiness, or contagious effects of text as the text that we are interested in are manifestations of different

To facilitate effective sensory fusion inference tasks inside embedded devices, this paper strives to enable resource- aware and resource-tunable inference systems, which are capable