I have started to learn Machine Learning, and programming in matlab. I want to plot a matrix sized m*d where d=3 and m are the number of points. with y binary vector I'd like to color each point with blue/red. and plot a plane which is described with the vertical vector to it w.
The problem I trying to solve is to give some kind of visual representation of the data and the linear predictor.
All I know is how to single points with plot3, but no any number of points.
Thanks.
Plot the points using
scatter3()
or using
plot3()
There are a few ways to plot a plane. As long as
w(3)
isn't very close to0
then the following will work okay. I'm assuming your plane is defined byx'*w+b=0
whereb
is a scalar andw
andx
are column vectors.Resulting plot