I have two clusters of data each cluster has x,y (coordinates) and a value to know it’s type(1 class1,2 class 2).I have plotted these data but i would like to split these classes with boundary(visually). what is the function to do such thing. i tried contour but it did not help!
Share
Consider this classification problem (using the Iris dataset):
As you can see, except for easily separable clusters for which you know the equation of the boundary beforehand, finding the boundary is not a trivial task…
One idea is to use the discriminant analysis function classify to find the boundary (you have a choice between linear and quadratic boundary).
The following is a complete example to illustrate the procedure. The code requires the Statistics Toolbox: