You are on page 1of 1

To classify the point x = [0.8, 0.

8]T into either class ω1 or ω2, we can


utilize the Bayesian classifier.

Utilize the function comp_ gauss_dens_val by :

P1 = 0.5

P2 = 0.5

m1 = [0, 0]T

m2 = [2, 2]T

S = [[2, 0], [0, 2]]

x = [0.8, 0.8]T

p1 = P1 * f(x | ω1)

p2 = P2 * f(x | ω2)

p1 = (1/2) * comp_gauss_dens_val(m1, S, x)

p2 = (1/2) * comp_gauss_dens_val(m2, S, x)

Substituting the values:

p1 = (1/2) * comp_gauss_dens_val([0, 0]T, [[2, 0], [0, 2]], [0.8, 0.8]T)

p2 = (1/2) * comp_gauss_dens_val([2, 2]T, [[2, 0], [0, 2]], [0.8, 0.8]T)

The resulting values for p1 and p2 are 0.02889 and 0.01936 ,


respectively, and x is classified to ω1 according to the Bayesian classifier.

You might also like