write.svm {e1071}R Documentation

Write SVM object to file

Description

This function exports an SVM object (trained by svm) to a specified file in the format that the function 'svm_load_model' of libsvm can read.

Usage

write.svm(object, file)

Arguments

object Object of class "svm", created by svm.
file filename to export the svm object to.

Details

This function is useful when SVM models trained in R shall be used in other environments.

Author(s)

Tomomi TAKASHINA (based on 'predict.svm' by David Meyer) t.takashina@computer.org

See Also

svm

Examples

data(iris)
attach(iris)

## classification mode
# default with factor response:
model <- svm (Species~., data=iris)

# export SVM object to file
write.svm(model, file="iris-classifier.svm")

[Package Contents]