Learn R Programming

gmum.r (version 0.2.1)

predict.Rcpp_SVMClient: Predict using SVM object

Description

Returns predicted classes or distance to discriminative for provided test examples.

Usage

"predict"(object, x_test, decision.function = FALSE, ...)

Arguments

object
Trained SVM object
x_test
Unlabeled data, in one of the following formats: data.frame, data.matrix, SparseM::matrix.csr, Matrix::Matrix, slam::simple_triplet_matrix
decision.function
Uf TRUE returns SVMs decision function (distance of a point from discriminant) instead of predicted labels, default: FALSE
...
other arguments not used by this method.

Examples

Run this code
## Not run: 
# # firstly, SVM model needs to be trained
# svm <- SVM(x, y, core="libsvm", kernel="linear", C=1)
# # then we can use it to predict unknown samples
# predcit(svm, x_test)
# ## End(Not run)

Run the code above in your browser using DataLab