Question: *** Using Python - NumPy ***** I need help. I am using the Support Vector Machine. I have to solve the decision boundary. In order
***Using Python - NumPy*****
I need help. I am using the Support Vector Machine. I have to solve the decision boundary.
In order to solve, I must solve 'w' and 'b' in the decision boundary: (^)()+=0.
You have to use the property that the support vector (x^i) must satisfy (^i)((^)(^i)+)=1.
Here is part of the code: (remember to I am using Python NumPy) I am currently stuck figuring out how to use Lagrangian decision boundaries. For w1 & w2, I have to use the equation w=summation(alpha(i), y(i),x(i)) to solve for w1 & w2. I know i can also use the np.dot()
In order to find b, I have to use y(w.T*x+b)=1.
My code is not print out anything. I need help to fix this.
w1 = np.sum(np.dot(A),np.dot(Y),np.dot(X)) w2 = np.sum(np.dot(A),np.dot(Y)) b = (1/Y)-np.dot(w2.t*X) print('w1 = ', w1) print('w2 = ', w2) print('b = ', b) Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
