diff --git a/DESCRIPTION b/DESCRIPTION index 436504fc..4e4ea44f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: mlr3fselect Title: Feature Selection for 'mlr3' -Version: 0.4.1.9000 +Version: 0.5.0 Authors@R: c(person(given = "Marc", family = "Becker", @@ -34,22 +34,19 @@ BugReports: https://github.com/mlr-org/mlr3fselect/issues Depends: R (>= 3.1.0) Imports: - bbotk (>= 0.2.2.9000), + bbotk (>= 0.3.0), checkmate (>= 2.0.0), data.table, lgr, mlr3 (>= 0.7.0), mlr3misc (>= 0.7.0), mlr3pipelines (>= 0.3.0), - paradox (>= 0.6.0.9000), + paradox (>= 0.7.0), R6 Suggests: genalg, rpart, testthat (>= 3.0.0) -Remotes: - mlr-org/bbotk, - mlr-org/paradox Encoding: UTF-8 NeedsCompilation: no Config/testthat/edition: 3 diff --git a/NEWS.md b/NEWS.md index 53f37884..0b3700eb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,8 @@ -# mlr3fselect 0.4.1.9000 +# mlr3fselect 0.5.0 - `FSelectorRFE` stores importance values of each evaluated feature set in archive. +- `ArchiveFSelect$data` is a public field now. # mlr3fselector 0.4.1 diff --git a/man-roxygen/example.R b/man-roxygen/example.R index ffaf028d..40e1c26e 100644 --- a/man-roxygen/example.R +++ b/man-roxygen/example.R @@ -20,4 +20,4 @@ #' instance$result #' #' # Allows access of data.table of full path of all evaluations -#' as.data.table(instance$archive) +#' as.data.table(instance$archive)} diff --git a/man/FSelectorExhaustiveSearch.Rd b/man/FSelectorExhaustiveSearch.Rd index ac652b11..c76e9d46 100644 --- a/man/FSelectorExhaustiveSearch.Rd +++ b/man/FSelectorExhaustiveSearch.Rd @@ -26,6 +26,30 @@ Maximum number of features. By default, number of features in \link[mlr3:Task]{m } } +\examples{ +library(mlr3) + +terminator = trm("evals", n_evals = 5) + +instance = FSelectInstanceSingleCrit$new( + task = tsk("iris"), + learner = lrn("classif.rpart"), + resampling = rsmp("holdout"), + measure = msr("classif.ce"), + terminator = terminator +) + +fselector = fs("exhaustive_search") +\donttest{ +# Modifies the instance by reference +fselector$optimize(instance) + +# Returns best scoring evaluation +instance$result + +# Allows access of data.table of full path of all evaluations +as.data.table(instance$archive)} +} \section{Super class}{ \code{\link[mlr3fselect:FSelector]{mlr3fselect::FSelector}} -> \code{FSelectorExhaustiveSearch} } diff --git a/man/FSelectorRandomSearch.Rd b/man/FSelectorRandomSearch.Rd index 1fa7d544..7c081807 100644 --- a/man/FSelectorRandomSearch.Rd +++ b/man/FSelectorRandomSearch.Rd @@ -35,6 +35,30 @@ Maximum number of feature sets to try in a batch.} } } +\examples{ +library(mlr3) + +terminator = trm("evals", n_evals = 5) + +instance = FSelectInstanceSingleCrit$new( + task = tsk("iris"), + learner = lrn("classif.rpart"), + resampling = rsmp("holdout"), + measure = msr("classif.ce"), + terminator = terminator +) + +fselector = fs("random_search") +\donttest{ +# Modifies the instance by reference +fselector$optimize(instance) + +# Returns best scoring evaluation +instance$result + +# Allows access of data.table of full path of all evaluations +as.data.table(instance$archive)} +} \section{Super class}{ \code{\link[mlr3fselect:FSelector]{mlr3fselect::FSelector}} -> \code{FSelectorRandomSearch} } diff --git a/man/FSelectorSequential.Rd b/man/FSelectorSequential.Rd index 01308e5d..6b8ba291 100644 --- a/man/FSelectorSequential.Rd +++ b/man/FSelectorSequential.Rd @@ -33,6 +33,30 @@ Search method \code{sfs} (forward search) or \code{sbs} (backward search).} } } +\examples{ +library(mlr3) + +terminator = trm("evals", n_evals = 5) + +instance = FSelectInstanceSingleCrit$new( + task = tsk("iris"), + learner = lrn("classif.rpart"), + resampling = rsmp("holdout"), + measure = msr("classif.ce"), + terminator = terminator +) + +fselector = fs("sequential") +\donttest{ +# Modifies the instance by reference +fselector$optimize(instance) + +# Returns best scoring evaluation +instance$result + +# Allows access of data.table of full path of all evaluations +as.data.table(instance$archive)} +} \section{Super class}{ \code{\link[mlr3fselect:FSelector]{mlr3fselect::FSelector}} -> \code{FSelectorSequential} }