predict.svmmaj | R Documentation |
This function predicts the predicted value (including intercept), given a
previous trained model which has been returned by
svmmaj
.
## S3 method for class 'svmmaj'
predict(object, X.new, y = NULL, weights = NULL, show.plot = FALSE, ...)
object |
Model which has been trained beforehand using
|
X.new |
Attribute matrix of the objects to be predicted, which has the
same number of attributes as the untransformed attribute matrix in
|
y |
The actual class labels (only if |
weights |
The weight of observation as the relative importance of the prediction error of the observation. |
show.plot |
If |
... |
Arguments to be passed to methods. |
The predicted value (including intercept) of class q.svmmaj
,
with attributes:
y |
The observed class labels of each object. |
yhat |
he predicted class labels of each object. |
classes |
The class labels. |
Hok San Yip, Patrick J.F. Groenen, Georgi Nalbantov
P.J.F. Groenen, G. Nalbantov and J.C. Bioch (2008) SVM-Maj: a majorization approach to linear support vector machines with different hinge errors.
svmmaj
attach(AusCredit)
## model training
model <- svmmaj(X[1:400, ], y[1:400], hinge = 'quadratic', lambda = 1)
## model prediction
q4 <- predict(model, X[-(1:400), ], y[-(1:400)], show.plot = TRUE)
q4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.