Saturday, 8 June 2013

matlab plotting linear regression on a 3D scatter plot

matlab plotting linear regression on a 3D scatter plot

I am new to matlab and have just started on the UBC AI course. I used the least squares algorithm to generate the weights for the data-set I'm working with and the weights ive generated are [ 0.3400 ,-0.0553 , -0.0667].
Using the weights generated I predicted the value of y against the current data set (predictions are shown as x and the actual values are shown as circles). This brings me to the problem of trying to visualize the regression plane using the weights and the data I have. So basically my problem is how do you visualize the linear regression plane using the data I now have collected, or am I missing something?
and do the weights generated correspond to the y-intercept, slope and its orientation? If so how do they fit into the 2D plane equation?

No comments:

Post a Comment