Docsity

Machine Learning per l'Ingegneria Biomedica: Oltre la Regressione Lineare, Appunti di Machine learning

Anteprima parziale del testo

Scarica Machine Learning per l'Ingegneria Biomedica: Oltre la Regressione Lineare e più Appunti in PDF di Machine learning solo su Docsity!

Machine Learning for

Biomedical Engineering

Enrico Grisan

[email protected]

Beyond linear regression

• Finding a discriminant projection instead of a

approximating projection

• Saturating the error function to deal with

outlier clusters

Fisher’s linear discriminant

Fisher’s linear discriminant

1) Maximize the separation between the projected class

means

2) Minimizing the variance within each class

2

𝑛∈𝒞𝑘

2

𝑛∈𝒞𝑘

𝑇 𝒙𝑛 − 𝒘 𝑇 𝒎𝑘) 2 𝑎𝑟𝑔 max 𝒘 𝐽 𝒘 = 𝑎𝑟𝑔 max 𝒘

2 𝜎 1 2

  • 𝜎 2 2 = 𝑎𝑟𝑔 max 𝒘

𝑇 Σ𝐵𝒘 𝒘𝑇Σ𝑊𝒘

More than one class

• K>2 classes

• D>K features

𝑛∈𝒞𝑘

𝑛∈𝒞𝑘

𝑇 𝑺𝑊 = 𝑘= 1 𝐾 𝑺𝑘

Computing the within-class

scatter matrix

More than one class

• K>2 classes

• D>K features

𝑛= 1 𝑁 𝒙𝑛 =

𝑘= 1 𝐾 𝑁𝑘 𝒎𝑘 𝑺𝐵 = 𝑘= 1 𝐾 (𝒎 − 𝒎𝑘)(𝒎 − 𝒎𝑘) 𝑇

Computing the between-

class scatter matrix

Fisher’s linear discriminant

FLD in practice (1)

Compute the class sample means and the between-class

covariance matrix:

% xx = Nx2 samples % yy = Nx1 labels n=find(yy==1); x1=xx(n,:); n=find(yy==-1); x2=xx(n,:); m1=mean(x1); m2=mean(x2); Sb=(m1-m2)'(m1-m2);*

FLD in practice (3)

Compute the eigendecomposition:

% xx = Nx2 samples % yy = Nx1 labels % Sw = 2x2 matrix % Sb = 2x2 matrix [V,D]=eigen(inv(Sw)Sb); w = V(:,1);*

FLD in practice (3)

Project the data and find the best threshold (bias):

% w = 2x1 vector y1=x1w; y2=x2w; t=min([y1;y2]):max([y1;y2]); [h1,t1]=hist(y1,t); [h2,t2]=hist(y2,t);**

𝒘 𝑇 𝒙

FLD for multi-class problems

𝑾 = 𝑎𝑟𝑔 max

𝐽(𝑾) = 𝑎𝑟𝑔 max

𝑾D𝑾

Classification of retinal lesions

D = 40 features per region

K1= 3 classes for dark regions (normal retina, haemorrage,

vessel)

K2= 4 classes for bright regione (normal retina, exudates, cotton

wool, drusen)

What’s behind FLD

• Gaussian distribution for the classes (also mixture

density)

• There exist a common covariance matrix

• Can make good use of unlabelled samples

• It is still sensitive to gross outliers (through

covariance)

FLD and probabilities

𝑇 Σ𝑘 − 1 (𝑥−𝜇𝑘)