Skip to content

Commit

Permalink
only separate categories in predict when type is not response
Browse files Browse the repository at this point in the history
  • Loading branch information
santikka committed Nov 22, 2023
1 parent f3b32f6 commit c2d0d88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/predict_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ parse_funs <- function(object, type, funs, categories) {
name <- paste0(fun_names[j], "_", funs_names[i])
if (length(resp_idx) > 0L) {
category <- ifelse_(
is_categorical(family_stoch[[resp_idx]]),
!identical(type, "response") &&
is_categorical(family_stoch[[resp_idx]]),
paste0("_", categories[[funs_names[i]]]),
""
)
Expand Down

0 comments on commit c2d0d88

Please sign in to comment.