I have no math or computer science training.
When I run
R spits out a prediction of 1 or 0 for each row of data. What is it doing to arrive at the prediction?
Isn't the formula the dot product of the w and x plus b? It is my understanding the prediction depends on whether or not the result is greater than or less than 0. Or maybe greater than or less than 1/-1 to be outside the margin.
I have read else ware to obtain the weights the code is
t(model$coefs) %*% model$SV and to find b the code is
If I go through and work out what the prediction should be manually my results do not match R's prediction. For a 2D vector I'm doing w1*x1 + w2*x2 +b. What is the correct way to work out the predictions manually?