Skip to content

Commit 4931d0d

Browse files
committed
NO NAMES 🙅
1 parent 2403a69 commit 4931d0d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/predict.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ format_num <- function(x) {
191191
names(x) <- paste0(".pred_", names(x))
192192
}
193193
} else {
194-
x <- tibble(.pred = x)
194+
x <- tibble(.pred = unname(x))
195195
}
196196

197197
x
@@ -201,14 +201,15 @@ format_class <- function(x) {
201201
if (inherits(x, "tbl_spark"))
202202
return(x)
203203

204-
tibble(.pred_class = x)
204+
tibble(.pred_class = unname(x))
205205
}
206206

207207
format_classprobs <- function(x) {
208208
if (!any(grepl("^\\.pred_", names(x)))) {
209209
names(x) <- paste0(".pred_", names(x))
210210
}
211211
x <- as_tibble(x)
212+
x <- purrr::map_dfr(x, rlang::set_names, NULL)
212213
x
213214
}
214215

0 commit comments

Comments
 (0)