Those weights you've generated are your regression coefficients, Beta0, Beta1
and Beta2
. If y
is your vertical axis and x1
, x2
are your features, or horizontal axes, they give you this equation for the plane:
y = Beta0 + Beta1*x1 + Beta2*x2
Which for you is: y = 0.3400 + -0.0553*x1 + -0.0667*x2
As for how to visualize this plane, we can find the answer at this SO answer
weights = [ 0.3400 ,-0.0553 , -0.0667];
[x1,x2]=ndgrid(-5:1:5,-5:1:5);
y = weights(1) + weights(2)*x1 + weights(3)*x2
figure
surf(x1,x2,y);