Skip to content

Help documentation updates #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/aaa_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ check_interface_val <- function(x) {
#' @keywords internal
#' @details These functions are available for users to add their
#' own models or engines (in package or otherwise) so that they can
#' be accessed using `parsnip`. This are more thoroughly documented
#' be accessed using `parsnip`. This is more thoroughly documented
#' on the package web site (see references below).
#'
#' In short, `parsnip` stores an environment object that contains
Expand Down
20 changes: 10 additions & 10 deletions R/boost_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' randomly sampled at each split when creating the tree models.
#' \item \code{trees}: The number of trees contained in the ensemble.
#' \item \code{min_n}: The minimum number of data points in a node
#' that are required for the node to be split further.
#' that is required for the node to be split further.
#' \item \code{tree_depth}: The maximum depth of the tree (i.e. number of
#' splits).
#' \item \code{learn_rate}: The rate at which the boosting algorithm adapts
Expand All @@ -23,10 +23,10 @@
#' stopping.
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' set using the `set_engine()` function. If left to their defaults
#' time that the model is fit. Other options and arguments can be
#' set using the `set_engine()` function. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
#' functions. If parameters need to be modified, `update()` can be used
#' in lieu of recreating the object from scratch.
#'
#' @param mode A single character string for the type of model.
Expand All @@ -38,18 +38,18 @@
#' @param trees An integer for the number of trees contained in
#' the ensemble.
#' @param min_n An integer for the minimum number of data points
#' in a node that are required for the node to be split further.
#' in a node that is required for the node to be split further.
#' @param tree_depth An integer for the maximum depth of the tree (i.e. number
#' of splits) (`xgboost` only).
#' @param learn_rate A number for the rate at which the boosting algorithm adapts
#' from iteration-to-iteration (`xgboost` only).
#' @param loss_reduction A number for the reduction in the loss function required
#' to split further (`xgboost` only).
#' to split further (`xgboost` only).
#' @param sample_size A number for the number (or proportion) of data that is
#' exposed to the fitting routine. For `xgboost`, the sampling is done at at
#' exposed to the fitting routine. For `xgboost`, the sampling is done at
#' each iteration while `C5.0` samples once during training.
#' @param stop_iter The number of iterations without improvement before
#' stopping (`xgboost` only).
#' stopping (`xgboost` only).
#' @details
#' The data given to the function are not saved and are only used
#' to determine the _mode_ of the model. For `boost_tree()`, the
Expand All @@ -58,7 +58,7 @@
#' The model can be created using the `fit()` function using the
#' following _engines_:
#' \itemize{
#' \item \pkg{R}: `"xgboost"` (the default), `"C5.0"`
#' \item \pkg{R}: `"xgboost"` (the default), `"C5.0"`
#' \item \pkg{Spark}: `"spark"`
#' }
#'
Expand Down Expand Up @@ -278,7 +278,7 @@ check_args.boost_tree <- function(object) {
#' of training set samples use for these purposes.
#' @param early_stop An integer or `NULL`. If not `NULL`, it is the number of
#' training iterations without improvement before stopping. If `validation` is
#' used, performance is base on the validation set; otherwise the training set
#' used, performance is base on the validation set; otherwise, the training set
#' is used.
#' @param ... Other options to pass to `xgb.train`.
#' @return A fitted `xgboost` object.
Expand Down
6 changes: 3 additions & 3 deletions R/decision_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' that are required for the node to be split further.
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
Expand All @@ -34,7 +34,7 @@
#' The model can be created using the `fit()` function using the
#' following _engines_:
#' \itemize{
#' \item \pkg{R}: `"rpart"` (the default) or `"C5.0"` (classification only)
#' \item \pkg{R}: `"rpart"` (the default) or `"C5.0"` (classification only)
#' \item \pkg{Spark}: `"spark"`
#' }
#'
Expand Down Expand Up @@ -206,7 +206,7 @@ check_args.decision_tree <- function(object) {
#' this means that the overall R-squared must increase by `cp` at
#' each step. The main role of this parameter is to save computing
#' time by pruning off splits that are obviously not worthwhile.
#' Essentially,the user informs the program that any split which
#' Essentially, the user informs the program that any split which
#' does not improve the fit by `cp` will likely be pruned off by
#' cross-validation, and that hence the program need not pursue it.
#' @param weights Optional case weights.
Expand Down
4 changes: 2 additions & 2 deletions R/descriptors.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#' Existing functions:
#' \itemize{
#' \item `.obs()`: The current number of rows in the data set.
#' \item `.preds()`: The number of columns in the data set that are
#' \item `.preds()`: The number of columns in the data set that is
#' associated with the predictors prior to dummy variable creation.
#' \item `.cols()`: The number of predictor columns available after dummy
#' variables are created (if any).
#' \item `.facts()`: The number of factor predictors in the dat set.
#' \item `.facts()`: The number of factor predictors in the data set.
#' \item `.lvls()`: If the outcome is a factor, this is a table
#' with the counts for each level (and `NA` otherwise).
#' \item `.x()`: The predictors returned in the format given. Either a
Expand Down
6 changes: 3 additions & 3 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#' ignored. Other options required to fit the model should be
#' passed using `set_engine()`.
#' @details `fit()` and `fit_xy()` substitute the current arguments in the model
#' specification into the computational engine's code, checks them
#' for validity, then fits the model using the data and the
#' specification into the computational engine's code, check them
#' for validity, then fit the model using the data and the
#' engine-specific code. Different model functions have different
#' interfaces (e.g. formula or `x`/`y`) and these functions translate
#' between the interface used when `fit()` or `fit_xy()` were invoked and the one
#' between the interface used when `fit()` or `fit_xy()` was invoked and the one
#' required by the underlying model.
#'
#' When possible, these functions attempt to avoid making copies of the
Expand Down
2 changes: 1 addition & 1 deletion R/linear_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' regularization (see below). Note that this will be ignored for some engines.
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
Expand Down
2 changes: 1 addition & 1 deletion R/logistic_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' regularization (see below). Note that this will be ignored for some engines.
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
Expand Down
4 changes: 2 additions & 2 deletions R/mars.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#' \item \code{num_terms}: The number of features that will be retained in the
#' final model.
#' \item \code{prod_degree}: The highest possible degree of interaction between
#' features. A value of 1 indicates and additive model while a value of 2
#' features. A value of 1 indicates an additive model while a value of 2
#' allows, but does not guarantee, two-way interactions between features.
#' \item \code{prune_method}: The type of pruning. Possible values are listed
#' in `?earth`.
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
Expand Down
2 changes: 1 addition & 1 deletion R/mlp.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' }
#'
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (see above), the values are taken from the underlying model
#' functions. One exception is `hidden_units` when `nnet::nnet` is used; that
Expand Down
6 changes: 3 additions & 3 deletions R/model_object_docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' The main elements of the object are:
#'
#' * `args`: A vector of the main arguments for the model. The
#' names of these arguments may be different form their
#' names of these arguments may be different from their
#' counterparts n the underlying model function. For example, for a
#' `glmnet` model, the argument name for the amount of the penalty
#' is called "penalty" instead of "lambda" to make it more general
Expand Down Expand Up @@ -146,7 +146,7 @@ NULL
#' The main elements of the object are:
#'
#' * `lvl`: A vector of factor levels when the outcome is
#' is a factor. This is `NULL` when the outcome is not a factor
#' a factor. This is `NULL` when the outcome is not a factor
#' vector.
#'
#' * `spec`: A `model_spec` object.
Expand All @@ -169,7 +169,7 @@ NULL
#' specification.
#'
#' This class and structure is the basis for how \pkg{parsnip}
#' stores model objects after to seeing the data and applying a model.
#' stores model objects after seeing the data and applying a model.
#' @rdname model_fit
#' @name model_fit
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/multinom_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' regularization (see below). Note that this will be ignored for some engines.
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
Expand Down
2 changes: 1 addition & 1 deletion R/nearest_neighbor.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' and the Euclidean distance with `dist_power = 2`.
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
Expand Down
2 changes: 1 addition & 1 deletion R/nullmodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' the training samples with that class (the other columns are zero). } \item{n
#' }{the number of elements in \code{y}}
#'
#' `predict.nullmodel()` returns a either a factor or numeric vector
#' `predict.nullmodel()` returns either a factor or numeric vector
#' depending on the class of \code{y}. All predictions are always the same.
#' @keywords models
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/predict_interval.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#' @rdname other_predict
#' @param level A single numeric value between zero and one for the
#' interval estimates.
#' @param std_error A single logical for wether the standard error should be
#' @param std_error A single logical for whether the standard error should be
#' returned (assuming that the model can compute it).
#' @inheritParams predict.model_fit
#' @method predict_confint model_fit
Expand Down
2 changes: 1 addition & 1 deletion R/surv_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' \item \code{dist}: The probability distribution of the outcome.
#' }
#' This argument is converted to its specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to its default
#' here (`NULL`), the value is taken from the underlying model
#' functions.
Expand Down
4 changes: 2 additions & 2 deletions R/svm_poly.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' (regression only)
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
Expand All @@ -28,7 +28,7 @@
#' @param degree A positive number for polynomial degree.
#' @param scale_factor A positive number for the polynomial scaling factor.
#' @param margin A positive number for the epsilon in the SVM insensitive
#' loss function (regression only)
#' loss function (regression only)
#' @details
#' The model can be created using the `fit()` function using the
#' following _engines_:
Expand Down
4 changes: 2 additions & 2 deletions R/svm_rbf.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' (regression only)
#' }
#' These arguments are converted to their specific names at the
#' time that the model is fit. Other options and argument can be
#' time that the model is fit. Other options and arguments can be
#' set using `set_engine()`. If left to their defaults
#' here (`NULL`), the values are taken from the underlying model
#' functions. If parameters need to be modified, `update()` can be used
Expand All @@ -27,7 +27,7 @@
#' or on the wrong side of the margin
#' @param rbf_sigma A positive number for radial basis function.
#' @param margin A positive number for the epsilon in the SVM insensitive
#' loss function (regression only)
#' loss function (regression only)
#' @details
#' The model can be created using the `fit()` function using the
#' following _engines_:
Expand Down
18 changes: 9 additions & 9 deletions man/boost_tree.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/decision_tree.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/descriptors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/fit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/linear_reg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading