We want equations of hyperplanes for algorithms like linear regression, SVM and so on. For two dimensional information that’s 2 enter options we want the equation of line, for 3 dimensional information, we want the equation of aircraft and for information whose dimension is bigger than 3, we want the equation of hyperplane.
A hyperplane is nothing however the equation of the aircraft for 4D information, 5D information , n-dimensional information
Lets us take into account 2D information.
Over there, the equation of line (common) is y = mx + c the place m is the slope and c is the intercept.
One other common type for the equation of line will be
ax + by + c = 0 — — — eq(1)
which may once more be written as :
y = -(a/b)x -(c/b).
Evaluating the above equation with y = mx + c, we get m = -a/b and c = -c/b
Now usually for greater dimensional information the axes are named as x1, x2, .. xn and never X axis and Y axis. So changing the x and y with x1 and x2 in equation 1 we get,
ax1 + bx2 + c = 0 — — — eq (2)
Now changing the coefficients i.e a with w1, b with w2 and c with w0. Since for greater dimensions as an alternative of a, b, c we use w1, w2, w3, … wn.
w1x1 + w2x2 + w0 = 0 — — — eq(3)
The identical kind of idea will be prolonged to 3D information
w1x1 + w2x2 + w3x3 + w0 = 0 — — — eq(4)
So for n dimensional information the equation of hyperplane can be
w1x1 + w2x2 + w3x3 + w4x4 + …… + wnxn + w0 = 0 — — — eq(5)
Now lets go to vectors
If we glance intently at equation 3 we are able to see that w1x1 + w2x2 is nothing however the dot product of w.x in vectors.
for a 4 dimensional information, when the equation of hyperplane is w1x1 + w2x2 + w3x3 + w4x4 + w0 = 0,
w.x = w1x1 + w2x2 + w3x3 + w4x4
To generalize this we are able to assume a vector w which has parts w1, w2, w3 …. wn inside it and a vector x which has parts x1, x2, x3 … xn inside it.
So rewriting equation 5 as
w.x + w0 = 0 — — — eq(6)
Right here w0 = 0 each time the hyperplane will cross by the origin
So equation will be modified as :