Skip to content

Commit 207841c

Browse files
authored
add more description for null_model (#1291)
1 parent cf9a823 commit 207841c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

R/nullmodel.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,18 @@ predict.nullmodel <- function (object, new_data = NULL, type = NULL, ...) {
127127

128128
#' Null model
129129
#'
130+
#' Fit a single mean or largest class model. `null_model()` is the user-facing
131+
#' function that relies on the underlying computational function, `nullmodel()`.
132+
#'
130133
#' `null_model()` defines a simple, non-informative model. It doesn't have any
131134
#' main arguments. This function can fit classification and regression models.
132135
#'
136+
#' `null_model()` emulates other model building functions, but returns the
137+
#' simplest model possible given a training set: a single mean for numeric
138+
#' outcomes and the most prevalent class for factor outcomes. When class
139+
#' probabilities are requested, the percentage of the training set samples with
140+
#' the most prevalent class is returned.
141+
#'
133142
#' @param mode A single character string for the type of model. The only
134143
#' possible values for this model are `"regression"` and `"classification"`.
135144
#' @param engine A single character string specifying what computational engine

man/null_model.Rd

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)