Skip to content

release: 1.4.0 #143

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

Merged
merged 7 commits into from
Aug 1, 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
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mlr3fselect
Title: Feature Selection for 'mlr3'
Version: 1.3.0.9000
Version: 1.4.0
Authors@R: c(
person("Marc", "Becker", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8115-0400")),
Expand All @@ -24,7 +24,7 @@ URL: https://mlr3fselect.mlr-org.com,
https://github.com/mlr-org/mlr3fselect
BugReports: https://github.com/mlr-org/mlr3fselect/issues
Depends:
mlr3 (>= 0.23.0),
mlr3 (>= 1.0.1),
R (>= 3.1.0)
Imports:
bbotk (>= 1.6.0),
Expand Down
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.4.0

* feat: Introduce asynchronous optimization with the `FSelectorAsync` and `FSelectInstanceAsync*` classes.
* feat: Add `max_nfeatures` argument in the `pareto_front()` and `knee_points()` methods of an `EnsembleFSResult()`.
Expand Down
2 changes: 1 addition & 1 deletion R/fselect.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' It executes the feature selection with the [FSelector] (`fselector`) and returns the result with the feature selection instance (`$result`).
#' The [ArchiveBatchFSelect] and [ArchiveAsyncFSelect] (`$archive`) stores all evaluated feature subsets and performance scores.
#'
#' You can find an overview of all feature selectors on our [website](https://mlr-org.com/feature-selectors.html).
#' You can find an overview of all feature selectors on our [website](https://mlr-org.com/fselectors.html).
#'
#' @details
#' The [mlr3::Task], [mlr3::Learner], [mlr3::Resampling], [mlr3::Measure] and [bbotk::Terminator] are used to construct a [FSelectInstanceBatchSingleCrit].
Expand Down
1 change: 0 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Package website: [release](https://mlr3fselect.mlr-org.com/) | [dev](https://mlr
<!-- badges: start -->
[![r-cmd-check](https://github.com/mlr-org/mlr3fselect/actions/workflows/r-cmd-check.yml/badge.svg)](https://github.com/mlr-org/mlr3fselect/actions/workflows/r-cmd-check.yml)
[![CRAN Status](https://www.r-pkg.org/badges/version/mlr3fselect)](https://cran.r-project.org/package=mlr3fselect)
[![StackOverflow](https://img.shields.io/badge/stackoverflow-mlr3-orange.svg)](https://stackoverflow.com/questions/tagged/mlr3)
[![Mattermost](https://img.shields.io/badge/chat-mattermost-orange.svg)](https://lmmisld-lmu-stats-slds.srv.mwn.de/mlr_invite/)
<!-- badges: end -->

Expand Down
109 changes: 55 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

# mlr3fselect <img src="man/figures/logo.png" align="right" width = "120" />

Package website: [release](https://mlr3fselect.mlr-org.com/) |
Package website: [release](https://mlr3fselect.mlr-org.com/) \|
[dev](https://mlr3fselect.mlr-org.com/dev/)

<!-- badges: start -->

[![r-cmd-check](https://github.com/mlr-org/mlr3fselect/actions/workflows/r-cmd-check.yml/badge.svg)](https://github.com/mlr-org/mlr3fselect/actions/workflows/r-cmd-check.yml)
[![CRAN
Status](https://www.r-pkg.org/badges/version/mlr3fselect)](https://cran.r-project.org/package=mlr3fselect)
[![StackOverflow](https://img.shields.io/badge/stackoverflow-mlr3-orange.svg)](https://stackoverflow.com/questions/tagged/mlr3)
[![Mattermost](https://img.shields.io/badge/chat-mattermost-orange.svg)](https://lmmisld-lmu-stats-slds.srv.mwn.de/mlr_invite/)
<!-- badges: end -->

Expand All @@ -29,24 +28,24 @@ The package is built on the optimization framework
There are several section about feature selection in the
[mlr3book](https://mlr3book.mlr-org.com).

- Getting started with [wrapper feature
selection](https://mlr3book.mlr-org.com/chapters/chapter6/feature_selection.html#sec-fs-wrapper).
- Do a [sequential forward
selection](https://mlr3book.mlr-org.com/chapters/chapter6/feature_selection.html#sec-fs-wrapper-example)
Palmer Penguins data set.
- Optimize [multiple performance
measures](https://mlr3book.mlr-org.com/chapters/chapter6/feature_selection.html#sec-multicrit-featsel).
- Estimate Model Performance with [nested
resampling](https://mlr3book.mlr-org.com/chapters/chapter6/feature_selection.html#sec-autofselect).
- Getting started with [wrapper feature
selection](https://mlr3book.mlr-org.com/chapters/chapter6/feature_selection.html#sec-fs-wrapper).
- Do a [sequential forward
selection](https://mlr3book.mlr-org.com/chapters/chapter6/feature_selection.html#sec-fs-wrapper-example)
Palmer Penguins data set.
- Optimize [multiple performance
measures](https://mlr3book.mlr-org.com/chapters/chapter6/feature_selection.html#sec-multicrit-featsel).
- Estimate Model Performance with [nested
resampling](https://mlr3book.mlr-org.com/chapters/chapter6/feature_selection.html#sec-autofselect).

The [gallery](https://mlr-org.com/gallery.html) features a collection of
case studies and demos about optimization.

- 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/).
- 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/).

The [cheatsheet](https://cheatsheets.mlr-org.com/mlr3fselect.pdf)
summarizes the most important functions of mlr3fselect.
Expand Down Expand Up @@ -76,16 +75,18 @@ library("mlr3verse")
tsk("spam")
```

## <TaskClassif:spam> (4601 x 58): HP Spam Detection
## * Target: type
## * Properties: twoclass
## * Features (57):
## - dbl (57): address, addresses, all, business, capitalAve, capitalLong, capitalTotal,
## charDollar, charExclamation, charHash, charRoundbracket, charSemicolon,
## charSquarebracket, conference, credit, cs, data, direct, edu, email, font, free,
## george, hp, hpl, internet, lab, labs, mail, make, meeting, money, num000, num1999,
## num3d, num415, num650, num85, num857, order, original, our, over, parts, people, pm,
## project, re, receive, remove, report, table, technology, telnet, will, you, your
##
## ── <TaskClassif> (4601x58): HP Spam Detection ──────────────────────────────────────────────────────
## • Target: type
## • Target classes: spam (positive class, 39%), nonspam (61%)
## • Properties: twoclass
## • Features (57):
## • dbl (57): address, addresses, all, business, capitalAve, capitalLong, capitalTotal, charDollar,
## charExclamation, charHash, charRoundbracket, charSemicolon, charSquarebracket, conference,
## credit, cs, data, direct, edu, email, font, free, george, hp, hpl, internet, lab, labs, mail,
## make, meeting, money, num000, num1999, num3d, num415, num650, num85, num857, order, original,
## our, over, parts, people, pm, project, re, receive, remove, report, table, technology, telnet,
## will, you, your

We construct an instance with the `fsi()` function. The instance
describes the optimization problem.
Expand All @@ -103,7 +104,7 @@ instance

## <FSelectInstanceBatchSingleCrit>
## * State: Not optimized
## * Objective: <ObjectiveFSelect:classif.svm_on_spam>
## * Objective: <ObjectiveFSelectBatch:classif.svm_on_spam>
## * Terminator: <TerminatorEvals>

We select a simple random search as the optimization algorithm.
Expand Down Expand Up @@ -132,19 +133,19 @@ instance.
instance$result_feature_set
```

## [1] "address" "addresses" "all" "business"
## [5] "capitalAve" "capitalLong" "capitalTotal" "charDollar"
## [9] "charExclamation" "charHash" "charRoundbracket" "charSemicolon"
## [13] "charSquarebracket" "conference" "credit" "cs"
## [17] "data" "direct" "edu" "email"
## [21] "font" "free" "george" "hp"
## [25] "internet" "lab" "labs" "mail"
## [29] "make" "meeting" "money" "num000"
## [33] "num1999" "num3d" "num415" "num650"
## [37] "num85" "num857" "order" "our"
## [41] "parts" "people" "pm" "project"
## [45] "re" "receive" "remove" "report"
## [49] "table" "technology" "telnet" "will"
## [1] "address" "addresses" "all" "business"
## [5] "capitalAve" "capitalLong" "capitalTotal" "charDollar"
## [9] "charExclamation" "charHash" "charRoundbracket" "charSemicolon"
## [13] "charSquarebracket" "conference" "credit" "cs"
## [17] "data" "direct" "edu" "email"
## [21] "font" "free" "george" "hp"
## [25] "internet" "lab" "labs" "mail"
## [29] "make" "meeting" "money" "num000"
## [33] "num1999" "num3d" "num415" "num650"
## [37] "num85" "num857" "order" "our"
## [41] "parts" "people" "pm" "project"
## [45] "re" "receive" "remove" "report"
## [49] "table" "technology" "telnet" "will"
## [53] "you" "your"

And the corresponding measured performance.
Expand All @@ -153,7 +154,7 @@ And the corresponding measured performance.
instance$result_y
```

## classif.ce
## classif.ce
## 0.07042005

The archive contains all evaluated hyperparameter configurations.
Expand All @@ -162,19 +163,19 @@ The archive contains all evaluated hyperparameter configurations.
as.data.table(instance$archive)
```

## address addresses all business capitalAve capitalLong capitalTotal charDollar charExclamation
## 1: TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## 2: TRUE TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE
## 3: TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE TRUE
## 4: TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## 5: FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE
## ---
## 16: FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## 17: FALSE FALSE FALSE TRUE TRUE TRUE FALSE FALSE TRUE
## 18: FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE
## 19: TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE
## 20: TRUE FALSE TRUE FALSE FALSE TRUE FALSE TRUE FALSE
## 56 variables not shown: [charHash, charRoundbracket, charSemicolon, charSquarebracket, conference, credit, cs, data, direct, edu, ...]
## address addresses all business capitalAve capitalLong capitalTotal charDollar
## 1: TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## 2: TRUE TRUE TRUE FALSE FALSE TRUE TRUE TRUE
## 3: TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE
## 4: TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## 5: FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE
## ---
## 16: FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## 17: FALSE FALSE FALSE TRUE TRUE TRUE FALSE FALSE
## 18: FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE
## 19: TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE
## 20: TRUE FALSE TRUE FALSE FALSE TRUE FALSE TRUE
## 58 variables not shown: [charExclamation, charHash, charRoundbracket, charSemicolon, charSquarebracket, conference, credit, cs, data, direct, ...]

We fit a final model with the optimized feature set to make predictions
on new data.
Expand Down
2 changes: 1 addition & 1 deletion man/fselect.Rd

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

Loading