write.svm {e1071} | R Documentation |
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.
write.svm(object, file)
object |
Object of class "svm" , created by svm . |
file |
filename to export the svm object to. |
This function is useful when SVM models trained in R shall be used in other environments.
Tomomi TAKASHINA (based on 'predict.svm' by David Meyer) t.takashina@computer.org
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")