mlr3fselect.svm_rfe | R Documentation |
Runs a recursive feature elimination with a mlr3learners::LearnerClassifSVM.
The SVM must be configured with type = "C-classification"
and kernel = "linear"
.
Guyon I, Weston J, Barnhill S, Vapnik V (2002). “Gene Selection for Cancer Classification using Support Vector Machines.” Machine Learning, 46(1), 389–422. ISSN 1573-0565, doi: 10.1023/A:1012487302797.
clbk("mlr3fselect.svm_rfe") library(mlr3learners) # Create instance with classification svm with linear kernel instance = fsi( task = tsk("sonar"), learner = lrn("classif.svm", type = "C-classification", kernel = "linear"), resampling = rsmp("cv", folds = 3), measures = msr("classif.ce"), terminator = trm("none"), callbacks = clbk("mlr3fselect.svm_rfe"), store_models = TRUE ) fselector = fs("rfe", feature_number = 5, n_features = 10) # Run recursive feature elimination on the Sonar data set fselector$optimize(instance)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.