Skip to content

Commit

Permalink
apply suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch authored Aug 23, 2024
1 parent 8c5fcd2 commit 1f83a36
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/glmnet-engines.R
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ format_glmnet_multinom_class <- function(pred, penalty, lvl, n_obs) {
if (!multi) {
if (length(penalty) != 1) {
cli::cli_abort(c(
"{.var penalty} should be a single numeric value.",
"{.arg penalty} should be a single numeric value.",
"i" = "{.fn multi_predict} can be used to get multiple predictions per row of data."
))
}
Expand Down
2 changes: 1 addition & 1 deletion R/logistic_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ translate.logistic_reg <- function(x, engine = x$engine, ...) {
} else if (quo_get_expr(x$args$mixture) == 1) {
arg_vals$type <- 6 ## lasso
} else {
cli::cli_abort("For the LiblineaR engine, {.var mixture} must be 0 or 1.")
cli::cli_abort("For the LiblineaR engine, {.arg mixture} must be 0 or 1.")
}
}
x$method$fit$args <- arg_vals
Expand Down
2 changes: 1 addition & 1 deletion R/mlp.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ keras_mlp <-

if (penalty > 0 & dropout > 0) {
cli::cli_abort("Please use either dropout or weight decay.", call = NULL)
}
}
if (!is.matrix(x)) {
x <- as.matrix(x)
}
Expand Down

0 comments on commit 1f83a36

Please sign in to comment.