Skip to content

Commit 30bcbb9

Browse files
authored
Prepare release (#150)
1 parent e894d01 commit 30bcbb9

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: mlr3filters
22
Title: Filter Based Feature Selection for 'mlr3'
3-
Version: 0.7.0-9000
3+
Version: 0.7.1
44
Authors@R: c(
55
person("Patrick", "Schratz", , "[email protected]", role = "aut",
66
comment = c(ORCID = "0000-0003-0748-6624")),

NEWS.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# mlr3filters 0.7.1
2+
3+
- Tagged multiple filters to be able of gracefully handling missing values.
4+
- Added more supported feature types to FilterCarScore.
5+
- Improved documentation.
6+
17
# mlr3filters 0.7.0
28

39
- Features are now checked for missing values to improve error messages (#140)

R/FilterCarScore.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ FilterCarScore = R6Class("FilterCarScore",
5555
id = "carscore",
5656
task_types = "regr",
5757
param_set = param_set,
58-
feature_types = "numeric",
58+
feature_types = c("logical", "integer", "numeric"),
5959
packages = "care",
6060
label = "Correlation-Adjusted coRrelation Score",
6161
man = "mlr3filters::mlr_filters_carscore"
@@ -66,7 +66,7 @@ FilterCarScore = R6Class("FilterCarScore",
6666
private = list(
6767
.calculate = function(task, nfeat) {
6868
target = task$truth()
69-
features = task$data(cols = task$feature_names)
69+
features = as_numeric_matrix(task$data(cols = task$feature_names))
7070

7171
pv = self$param_set$values
7272
scores = invoke(care::carscore,

R/helper.R

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ catn = function(..., file = "") {
1313
cat(paste0(..., collapse = "\n"), "\n", sep = "", file = file)
1414
}
1515

16+
as_numeric_matrix = function(x) {
17+
x = as.matrix(x)
18+
if (is.logical(x)) {
19+
storage.mode(x) = "double"
20+
}
21+
x
22+
}
1623

1724
test_matching_task_type = function(task_type, object, class) {
1825
fget = function(tab, i, j, key) {

0 commit comments

Comments
 (0)