read.svm.data {rpud} | R Documentation |
The read.svm.data
reads a training file in
the LIBSVM data format, and is a replacement
of the read.matrix.csr
function in e1071
.
In the non-free rpudplus
add-on, the method redirects to
a native C++ implementation with enhanced robustness and performance.
This method is not supported in the free rpud
package.
read.svm.data(file, fac = TRUE, sparse = TRUE)
file |
The path name of the file in LIBSVM training data format. |
fac |
If |
sparse |
If |
The method returns a list with two components:
x |
object of class |
y |
vector of numeric values or factor levels, depending on
the value of |
Chi Yau (based on R doc of read.matrix.csr
in e1071
by David Meyer)
chi.yau@r-tutor.com
## Not run: library(rpud) library(SparseM) filepath <- file.path(.path.package(package="rpud"), "runit/data/heart_scale") hs <- read.svm.data(filepath, fac=TRUE) x <- hs$x y <- hs$y model <- rpusvm(x, y) summary(model) ## End(Not run)