You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard pmml package can convert ksvm objects that have been trained using the kernlab::ksvm function. Unfortunately, the converter implementation is rather limited, because it fails to handle ksvm objects that have been trained using alternative means.
For example, it is impossible to convert a ksvm object that was trained using the caret package:
library("caret")
library("kernlab")
library("pmml")
iris.ksvm = ksvm(Species ~ ., data = iris)
class(iris.ksvm)
ksvm.pmml = pmml(iris.ksvm, dataset = iris)
iris_x = iris[, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")]
iris_y = iris[, c("Species")]
iris.train = train(x = iris_x, y = iris_y, data = iris, method = "svmRadial")
class(iris.train$finalModel)
# Error in if (field$class[[1]][1] == "numeric") { :
# argument is of length zero
train.pmml = pmml(iris.train$finalModel, dataset = iris)
The text was updated successfully, but these errors were encountered:
The standard
pmml
package can convertksvm
objects that have been trained using thekernlab::ksvm
function. Unfortunately, the converter implementation is rather limited, because it fails to handleksvm
objects that have been trained using alternative means.For example, it is impossible to convert a
ksvm
object that was trained using thecaret
package:The text was updated successfully, but these errors were encountered: