diff --git a/NEWS.md b/NEWS.md index 1360c86c..3b8a5f9e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 diff --git a/R/FilterFindCorrelation.R b/R/FilterFindCorrelation.R index 59acf15a..20a7e6f8 100644 --- a/R/FilterFindCorrelation.R +++ b/R/FilterFindCorrelation.R @@ -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) + } } ) )