From a464bb9ad871db7b0bbc94a4fb06a6a6a25f614f Mon Sep 17 00:00:00 2001 From: john Date: Thu, 5 Dec 2024 12:10:20 +0100 Subject: [PATCH] remove bmr_score class --- R/embedded_ensemble_fselect.R | 2 ++ R/ensemble_fselect.R | 2 ++ 2 files changed, 4 insertions(+) diff --git a/R/embedded_ensemble_fselect.R b/R/embedded_ensemble_fselect.R index 8852d760..31f35775 100644 --- a/R/embedded_ensemble_fselect.R +++ b/R/embedded_ensemble_fselect.R @@ -88,6 +88,8 @@ embedded_ensemble_fselect = function( # extract scores on the test sets scores = bmr$score(measure) + # remove `bmr_score` class + class(scores) = c("data.table", "data.frame") set(scores, j = "features", value = features) set(scores, j = "n_features", value = n_features) diff --git a/R/ensemble_fselect.R b/R/ensemble_fselect.R index 12be4636..d59d6049 100644 --- a/R/ensemble_fselect.R +++ b/R/ensemble_fselect.R @@ -136,6 +136,8 @@ ensemble_fselect = function( # extract scores on the test sets scores = bmr$score(measure) + # remove `bmr_score` class + class(scores) = c("data.table", "data.frame") set(scores, j = "features", value = features) set(scores, j = "n_features", value = n_features)