Skip to content

Commit 9f7a25a

Browse files
committed
re-wrote the glmnet notes
1 parent 7fc1cf4 commit 9f7a25a

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

R/linear_reg.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@
6969
#' \Sexpr[results=rd]{parsnip:::show_fit(parsnip:::linear_reg(), "keras")}
7070
#'
7171
#' When using `glmnet` models, there is the option to pass
72-
#' multiple values (or no values) to the `penalty` argument.
73-
#' This can have an effect on the model object results. When using
74-
#' the `predict()` method in these cases, the return object type
75-
#' depends on the value of `penalty`. If a single value is
76-
#' given, the results will be a simple numeric vector. When
77-
#' multiple values or no values for `penalty` are used in
78-
#' `linear_reg()`, the `predict()` method will return a data frame with
79-
#' columns `values` and `lambda`.
72+
#' multiple values (or no values) to the `penalty` argument. This
73+
#' can have an effect on the model object results. When using the
74+
#' `predict()` method in these cases, the return value depends on
75+
#' the value of `penalty`. When using `predict()`, only a single
76+
#' value of the penalty can be used. When predicting on multiple
77+
#' penalties, the `multi_predict()` function can be used. It
78+
#' returns a tibble with a list column called `.pred` that contains
79+
#' a tibble with all of the penalty results.
8080
#'
8181
#' For prediction, the `stan` engine can compute posterior
8282
#' intervals analogous to confidence and prediction intervals. In
@@ -130,7 +130,7 @@ print.linear_reg <- function(x, ...) {
130130
cat("Linear Regression Model Specification (", x$mode, ")\n\n", sep = "")
131131
model_printer(x, ...)
132132

133-
if(!is.null(x$method$fit$args)) {
133+
if (!is.null(x$method$fit$args)) {
134134
cat("Model fit template:\n")
135135
print(show_call(x))
136136
}

R/logistic_reg.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@
6767
#' \Sexpr[results=rd]{parsnip:::show_fit(parsnip:::logistic_reg(), "keras")}
6868
#'
6969
#' When using `glmnet` models, there is the option to pass
70-
#' multiple values (or no values) to the `penalty` argument.
71-
#' This can have an effect on the model object results. When using
72-
#' the `predict()` method in these cases, the return object type
73-
#' depends on the value of `penalty`. If a single value is
74-
#' given, the results will be a simple numeric vector. When
75-
#' multiple values or no values for `penalty` are used in
76-
#' `logistic_reg()`, the `predict()` method will return a data frame with
77-
#' columns `values` and `lambda`.
70+
#' multiple values (or no values) to the `penalty` argument. This
71+
#' can have an effect on the model object results. When using the
72+
#' `predict()` method in these cases, the return value depends on
73+
#' the value of `penalty`. When using `predict()`, only a single
74+
#' value of the penalty can be used. When predicting on multiple
75+
#' penalties, the `multi_predict()` function can be used. It
76+
#' returns a tibble with a list column called `.pred` that contains
77+
#' a tibble with all of the penalty results.
7878
#'
7979
#' For prediction, the `stan` engine can compute posterior
8080
#' intervals analogous to confidence and prediction intervals. In

R/multinom_reg.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@
5858
#' \Sexpr[results=rd]{parsnip:::show_fit(parsnip:::multinom_reg(), "keras")}
5959
#'
6060
#' When using `glmnet` models, there is the option to pass
61-
#' multiple values (or no values) to the `penalty` argument.
62-
#' This can have an effect on the model object results. When using
63-
#' the `predict()` method in these cases, the return object type
64-
#' depends on the value of `penalty`. If a single value is
65-
#' given, the results will be a simple numeric vector. When
66-
#' multiple values or no values for `penalty` are used in
67-
#' `multinom_reg()`, the `predict()` method will return a data frame with
68-
#' columns `values` and `lambda`.
61+
#' multiple values (or no values) to the `penalty` argument. This
62+
#' can have an effect on the model object results. When using the
63+
#' `predict()` method in these cases, the return value depends on
64+
#' the value of `penalty`. When using `predict()`, only a single
65+
#' value of the penalty can be used. When predicting on multiple
66+
#' penalties, the `multi_predict()` function can be used. It
67+
#' returns a tibble with a list column called `.pred` that contains
68+
#' a tibble with all of the penalty results.
6969
#'
7070
#' @note For models created using the spark engine, there are
7171
#' several differences to consider. First, only the formula

0 commit comments

Comments
 (0)