Skip to content

Commit 3703b29

Browse files
committed
multinomial fixes for #382
1 parent c98a441 commit 3703b29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/multinom_reg_data.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ set_pred(
6161
args =
6262
list(
6363
object = quote(object$fit),
64-
newx = quote(as.matrix(new_data)),
64+
newx = quote(as.matrix(new_data[, rownames(object$fit$beta[[1]])])),
6565
type = "class",
6666
s = quote(object$spec$args$penalty)
6767
)
@@ -80,7 +80,7 @@ set_pred(
8080
args =
8181
list(
8282
object = quote(object$fit),
83-
newx = quote(as.matrix(new_data)),
83+
newx = quote(as.matrix(new_data[, rownames(object$fit$beta[[1]])])),
8484
type = "response",
8585
s = quote(object$spec$args$penalty)
8686
)

0 commit comments

Comments
 (0)