Hello everyone. I have a serious problem here with developping this matlab code. I'm new with Matlab.
We want to solve a problem of binary classification . Forthis we have two distributions that have a degree of overlap determined. We want to apply the Bayesian hypothesis test to discriminate between the two classes.
In this case, we use a parametric estimation of the fdp (probability density functions), and we will consider fdp's from normal distributions. The work involved is as followings:
1- generate 2 gausiens distributions with a degree of overlap determined.
2- Estimate the parameters of distributions: the mean vector and matrix covariance.
3- Conceive the Bayesian test : P(Wi|x)>P(Wj|x).decide the class i
4- Draw the decision boundary
For the two first questions i already solved it by this matlab code :
clear all, close all , clc
Mx1 = mean(P1,2);
Mx2 = mean(P2,2);
For the last question here is the code of the function that defines the boundary:
X = [-x:0.02:x]; Y = [-x:0.02:x];
p = [X(i);Y(j)];