This package provides feature selection for mlr3. It offers various feature selection wrappers, e.g. random search and sequential feature selection and different termination criteria can be set and combined.’AutoFSelect’ provides a convenient way to perform nested resampling in combination with ‘mlr3’. The package is build on bbotk which provides a common framework for optimization. For feature filters and embedded methods, see mlr3filters
Install the last release from CRAN:
Install the development version from GitHub:
library("mlr3") library("mlr3fselect") task = tsk("pima") learner = lrn("classif.rpart") resampling = rsmp("holdout") measure = msr("classif.ce") # define termination criterion terminator = trm("evals", n_evals = 20) # create fselect instance instance = FSelectInstanceSingleCrit$new( task = task, learner = learner, resampling = resampling, measure = measure, terminator = terminator) # load fselector fselector = fs("random_search") # trigger optimization fselector$optimize(instance)
## age glucose insulin mass pedigree pregnant pressure triceps ## 1: TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE ## features classif.ce ## 1: age,glucose,insulin,mass,pedigree,triceps 0.1757812
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.