Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 1.3.0 #131

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mlr3fselect
Title: Feature Selection for 'mlr3'
Version: 1.2.1.9000
Version: 1.3.0
Authors@R: c(
person("Marc", "Becker", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8115-0400")),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ importFrom(utils,bibentry)
importFrom(utils,combn)
importFrom(utils,head)
importFrom(utils,packageVersion)
importFrom(utils,tail)
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mlr3fselect (development version)
# mlr3fselect 1.3.0

* refactor: Use [fastVoteR](https://github.com/bblodfon/fastVoteR) for feature ranking in `EnsembleFSResult()` objects
* feat: Add embedded ensemble feature selection `embedded_ensemble_fselect()`
Expand Down
5 changes: 2 additions & 3 deletions R/ArchiveBatchFSelect.R
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ ArchiveBatchFSelect = R6Class("ArchiveBatchFSelect",
tab = if (is.null(batch)) self$data else self$data[list(batch), , on = "batch_nr"]

if (self$codomain$target_length == 1L) {
y = tab[[self$cols_y]] * -self$codomain$maximization_to_minimization

y = tab[[self$cols_y]] * -self$codomain$direction
if (ties_method == "least_features") {
ii = which(y == max(y))
tab = tab[ii]
Expand All @@ -197,7 +196,7 @@ ArchiveBatchFSelect = R6Class("ArchiveBatchFSelect",
}
} else {
ymat = t(as.matrix(tab[, self$cols_y, with = FALSE]))
ymat = self$codomain$maximization_to_minimization * ymat
ymat = self$codomain$direction * ymat
tab[!is_dominated(ymat)]
}
}
Expand Down
2 changes: 1 addition & 1 deletion R/EnsembleFSResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ EnsembleFSResult = R6Class("EnsembleFSResult",
#' The column with the performance scores on the inner resampling of the train sets is not mandatory,
#' but note that it should be named as `{inner_measure$id}_inner` to distinguish from
#' the `{measure$id}`.
#' @param features ([character()])\cr
#' @param features (`character()`)\cr
#' The vector of features of the task that was used in the ensemble feature
#' selection.
#' @param benchmark_result ([mlr3::BenchmarkResult])\cr
Expand Down
1 change: 0 additions & 1 deletion R/FSelectInstanceBatchSingleCrit.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#'
#' * Utilize the built-in feature importance of models with [Recursive Feature Elimination](https://mlr-org.com/gallery/optimization/2023-02-07-recursive-feature-elimination/).
#' * Run a feature selection with [Shadow Variable Search](https://mlr-org.com/gallery/optimization/2023-02-01-shadow-variable-search/).
#' * [Feature Selection](https://mlr-org.com/gallery/optimization/2020-09-14-mlr3fselect-basic/) on the Titanic data set.
#'
#' @template param_task
#' @template param_learner
Expand Down
7 changes: 2 additions & 5 deletions R/ensemble_fselect.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,15 @@
#' The result object also includes the performance scores calculated during the inner resampling of the training sets, using models with the best feature subsets.
#' These scores are stored in a column named `{measure_id}_inner`.
#'
#' @section Note:
#'
#' @note
#' The **active measure** of performance is the one applied to the test sets.
#' This is preferred, as inner resampling scores on the training sets are likely to be overestimated when using the final models.
#' Users can change the active measure by using the `set_active_measure()` method of the [EnsembleFSResult].
#'
#' @param learners (list of [mlr3::Learner])\cr
#' The learners to be used for feature selection.
#' @param init_resampling ([mlr3::Resampling])\cr
#' The initial resampling strategy of the data, from which each train set
#' will be passed on to the [auto_fselector] to optimize the learners and
#' perform feature selection.
#' The initial resampling strategy of the data, from which each train set will be passed on to the [auto_fselector] to optimize the learners and perform feature selection.
#' Each test set will be used for prediction on the final models returned by [auto_fselector].
#' Can only be [mlr3::ResamplingSubsampling] or [mlr3::ResamplingBootstrap].
#' @param inner_resampling ([mlr3::Resampling])\cr
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @import mlr3
#' @import bbotk
#' @importFrom R6 R6Class
#' @importFrom utils combn head packageVersion
#' @importFrom utils combn head tail packageVersion
#' @importFrom stats sd
"_PACKAGE"

Expand Down
1 change: 0 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ The [gallery](https://mlr-org.com/gallery.html) features a collection of case st

* Utilize the built-in feature importance of models with [Recursive Feature Elimination](https://mlr-org.com/gallery/optimization/2023-02-07-recursive-feature-elimination/).
* Run a feature selection with [Shadow Variable Search](https://mlr-org.com/gallery/optimization/2023-02-01-shadow-variable-search/).
* [Feature Selection](https://mlr-org.com/gallery/optimization/2020-09-14-mlr3fselect-basic/) on the Titanic data set.

The [cheatsheet](https://cheatsheets.mlr-org.com/mlr3fselect.pdf) summarizes the most important functions of mlr3fselect.

Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ case studies and demos about optimization.
Elimination](https://mlr-org.com/gallery/optimization/2023-02-07-recursive-feature-elimination/).
- Run a feature selection with [Shadow Variable
Search](https://mlr-org.com/gallery/optimization/2023-02-01-shadow-variable-search/).
- [Feature
Selection](https://mlr-org.com/gallery/optimization/2020-09-14-mlr3fselect-basic/)
on the Titanic data set.

The [cheatsheet](https://cheatsheets.mlr-org.com/mlr3fselect.pdf)
summarizes the most important functions of mlr3fselect.
Expand Down
1 change: 0 additions & 1 deletion man/FSelectInstanceBatchSingleCrit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ensemble_fs_result.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions man/ensemble_fselect.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/fselect.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/fsi.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading