I am using one class SVM to train and predict anomalies. I would like to train the model using cross validation in an easy way as I have done with a multiclass SVM with caret in R.
Now, I train the model doing:
svm.model<-svm(training,y=NULL, type='one-classification', nu=0.01, gamma=0.002, scale=TRUE, kernel="radial")
However, I would like to use caret, apply cross validation and do something like:
train_control <- trainControl(method="repeatedcv", number=10, repeats=3) svm.model <- train(classe~., data=training, method="svmRadial", trControl=train_control)
But instead of training a multiclass SVM I would like to use one class SVM.
Is there a way to do that in R with caret?