Generally, the decision function of a SVM model should be like $f(x) = sgn(\sum_i\alpha_iy_iK(x, x_i) + b)$. Then, how to get the $\alpha_i$ and $b$ in the function after the model is trained?
For example,
# Training data
X = [-2 -1 -1 1 1 2;
-1 -1 -2 1 2 1]
y = [1, 1, 1, 2, 2, 2]
# Precomputed matrix for training (corresponds to linear kernel)
K = X' * X
model = svmtrain(K, y, kernel=Kernel.Precomputed)
Are they model.coefs and model.rho?