Skip to content

Commit

Permalink
fix: property missings of PipeOpFindCorrelation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebffischer committed Oct 13, 2023
1 parent 63dab5e commit 9b9d46f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# mlr3filters 0.7.1-9000

* Parameter value `na.rm` is properly initialized to `TRUE` (Thanks to @bblodfon)
* Bugfix: property `missings` is now set correctly for `FilterFindCorrelation`

# mlr3filters 0.7.1

Expand Down
8 changes: 8 additions & 0 deletions R/FilterFindCorrelation.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ FilterFindCorrelation = R6Class("FilterFindCorrelation",
# The following has the correct names and values, BUT we need scores in
# reverse order. Shift by 1 to get positive values.
1 - apply(cm, 2, max)
},
.get_properties = function() {
use = self$param_set$values$use %??% "everything"
if (use %in% c("complete.obs", "pairwise.complete.obs")) {
"missings"
} else {
character(0)
}
}
)
)
Expand Down

0 comments on commit 9b9d46f

Please sign in to comment.