Skip to content

Commit

Permalink
Prepare release (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
mllg authored Feb 16, 2023
1 parent e894d01 commit 30bcbb9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mlr3filters
Title: Filter Based Feature Selection for 'mlr3'
Version: 0.7.0-9000
Version: 0.7.1
Authors@R: c(
person("Patrick", "Schratz", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0003-0748-6624")),
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# mlr3filters 0.7.1

- Tagged multiple filters to be able of gracefully handling missing values.
- Added more supported feature types to FilterCarScore.
- Improved documentation.

# mlr3filters 0.7.0

- Features are now checked for missing values to improve error messages (#140)
Expand Down
4 changes: 2 additions & 2 deletions R/FilterCarScore.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ FilterCarScore = R6Class("FilterCarScore",
id = "carscore",
task_types = "regr",
param_set = param_set,
feature_types = "numeric",
feature_types = c("logical", "integer", "numeric"),
packages = "care",
label = "Correlation-Adjusted coRrelation Score",
man = "mlr3filters::mlr_filters_carscore"
Expand All @@ -66,7 +66,7 @@ FilterCarScore = R6Class("FilterCarScore",
private = list(
.calculate = function(task, nfeat) {
target = task$truth()
features = task$data(cols = task$feature_names)
features = as_numeric_matrix(task$data(cols = task$feature_names))

pv = self$param_set$values
scores = invoke(care::carscore,
Expand Down
7 changes: 7 additions & 0 deletions R/helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ catn = function(..., file = "") {
cat(paste0(..., collapse = "\n"), "\n", sep = "", file = file)
}

as_numeric_matrix = function(x) {
x = as.matrix(x)
if (is.logical(x)) {
storage.mode(x) = "double"
}
x
}

test_matching_task_type = function(task_type, object, class) {
fget = function(tab, i, j, key) {
Expand Down

0 comments on commit 30bcbb9

Please sign in to comment.