
1.4 Minimum Distance Classifiers 7
Solution. Take the following steps:
Step 1. Use the function euclidean_classifier by typing
x=[0.1 0.5 0.1]';
m1=[0 0 0]'; m2=[0.5 0.5 0.5]';
m=[m1 m2];
z=euclidean_classifier(m,x)
The answer is z = 1; that i s, t he point is classi fied t o the ω
1
class.
Step 2. Use the function mahalanobis_classifier by typing
x=[0.1 0.5 0.1]';
m1=[0 0 0]'; m2=[0.5 0.5 0.5]';
m=[m1 m2];
S=[0.8 0.01 0.01;0.01 0.2 0.01; 0.01 0.01 0.2];
z=mahalanobis_classifier(m,S,x);
This time, the answer is z = 2, meaning the point is classified to the second class. For this case, the
optimal Bayesian classifier i s realized by t he Mahal anobis distance clas ...