Skip to content

Commit a268418

Browse files
committed
Consider the adding of hyperparams in the results when there are not tunable params
1 parent c022ac8 commit a268418

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

R/machine_learning.R

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3894,13 +3894,15 @@ aggregate_results <- function(all_loaded, task = c("classification", "survival")
38943894

38953895
rownames(all_preds) <- NULL
38963896

3897-
# Add any extra columns if present
3898-
extra_cols <- setdiff(
3899-
names(all_preds),
3900-
c("rowIndex", "Resample", "obs", "pred", "no", "yes", hp_cols_all)
3901-
)
3902-
if (length(extra_cols) > 0) {
3903-
hp_cols_all <- c(hp_cols_all, extra_cols)
3897+
if(has_params){
3898+
# Add any extra columns if present
3899+
extra_cols <- setdiff(
3900+
names(all_preds),
3901+
c("rowIndex", "Resample", "obs", "pred", "no", "yes", hp_cols_all)
3902+
)
3903+
if (length(extra_cols) > 0) {
3904+
hp_cols_all <- c(hp_cols_all, extra_cols)
3905+
}
39043906
}
39053907

39063908
# ---- Compute metrics per resample ----

0 commit comments

Comments
 (0)