|
1 | | -#' Model Specification Information |
| 1 | +#' Model Specifications |
2 | 2 | #' |
| 3 | +#' @description |
3 | 4 | #' |
4 | | -#' An object with class "model_spec" is a container for |
| 5 | +#' The parsnip package splits the process of fitting models into two steps: |
| 6 | +#' |
| 7 | +#' 1) Specify how a model will be fit using a _model specification_ |
| 8 | +#' 2) Fit a model using the model specification |
| 9 | +#' |
| 10 | +#' This is a different approach to many other model interfaces in R, like `lm()`, |
| 11 | +#' where both the specification of the model and the fitting happens in one |
| 12 | +#' function call. Splitting the process into two steps allows users to |
| 13 | +#' iteratively define model specifications throughout the model development |
| 14 | +#' process. |
| 15 | +#' |
| 16 | +#' This intermediate object that defines how the model will be fit is called |
| 17 | +#' a _model specification_ and has class `model_spec`. Model type functions, |
| 18 | +#' like [linear_reg()] or [boost_tree()], return `model_spec` objects. |
| 19 | +#' |
| 20 | +#' Fitted model objects, resulting from passing a `model_spec` to |
| 21 | +#' [fit()][fit.model_spec()] or [fit_xy][fit_xy.model_spec()], have |
| 22 | +#' class `model_fit`, and contain the original `model_spec` objects inside |
| 23 | +#' them. See [?model_fit][model_fit] for more on that object type, and |
| 24 | +#' [?extract_spec_parsnip][extract_spec_parsnip.model_fit] to |
| 25 | +#' extract `model_spec`s from `model_fit`s. |
| 26 | +#' |
| 27 | +#' @details |
| 28 | +#' |
| 29 | +#' An object with class `"model_spec"` is a container for |
5 | 30 | #' information about a model that will be fit. |
6 | 31 | #' |
7 | 32 | #' The main elements of the object are: |
|
140 | 165 | #' @name model_spec |
141 | 166 | NULL |
142 | 167 |
|
143 | | -#' Model Fit Object Information |
| 168 | +#' Model Fit Objects |
| 169 | +#' |
| 170 | +#' @description |
| 171 | +#' |
| 172 | +#' Model fits are trained [model specifications][model_spec] that are |
| 173 | +#' ready to [predict][predict.model_fit] on new data. Model fits have class |
| 174 | +#' `model_fit` and, usually, a subclass referring to the engine |
| 175 | +#' used to fit the model. |
144 | 176 | #' |
| 177 | +#' @details |
145 | 178 | #' |
146 | | -#' An object with class "model_fit" is a container for |
| 179 | +#' An object with class `"model_fit"` is a container for |
147 | 180 | #' information about a model that has been fit to the data. |
148 | 181 | #' |
149 | 182 | #' The main elements of the object are: |
|
0 commit comments