powered by
Predict from a Standard SVM
# S3 method for svms predict(object, newdata, decision.values = FALSE, ...)
A factor of predicted classes, or a numeric vector when decision.values = TRUE.
decision.values = TRUE
A fitted svms object.
svms
Numeric matrix or data frame.
If TRUE, return raw decision values instead of class labels.
TRUE
Unused.
set.seed(2) dat <- gen_moons(30) fit <- svms(dat$x, dat$y) predict(fit, dat$x, decision.values = TRUE)
Run the code above in your browser using DataLab