diff --git a/R/fit.R b/R/fit.R index 3725396d9..2256d1a80 100644 --- a/R/fit.R +++ b/R/fit.R @@ -89,8 +89,8 @@ #' @export fit.model_spec fit.model_spec <- function(object, - formula = NULL, - data = NULL, + formula, + data, control = control_parsnip(), ... ) { @@ -180,8 +180,8 @@ fit.model_spec <- #' @export fit_xy.model_spec fit_xy.model_spec <- function(object, - x = NULL, - y = NULL, + x, + y, control = control_parsnip(), ... ) { diff --git a/docs/dev/articles/articles/Classification.html b/docs/dev/articles/articles/Classification.html index 20a8780b1..465762e1a 100644 --- a/docs/dev/articles/articles/Classification.html +++ b/docs/dev/articles/articles/Classification.html @@ -153,7 +153,7 @@

Classification Example

nnet_fit #> parsnip model object #> -#> Fit in: 15.3sModel +#> Fit in: 14.8sModel #> ________________________________________________________________________________ #> Layer (type) Output Shape Param # #> ================================================================================ @@ -185,17 +185,17 @@

Classification Example

#> # A tibble: 1 x 3 #> .metric .estimator .estimate #> <chr> <chr> <dbl> -#> 1 roc_auc binary 0.824 +#> 1 roc_auc binary 0.825 test_results %>% accuracy(truth = Status, nnet_class) #> # A tibble: 1 x 3 #> .metric .estimator .estimate #> <chr> <chr> <dbl> -#> 1 accuracy binary 0.801 +#> 1 accuracy binary 0.805 test_results %>% conf_mat(truth = Status, nnet_class) #> Truth #> Prediction bad good -#> bad 188 96 -#> good 125 704 +#> bad 190 94 +#> good 123 706
# S3 method for model_spec
-fit(object, formula = NULL, data = NULL, control = control_parsnip(), ...)
+fit(object, formula, data, control = control_parsnip(), ...)
 
 # S3 method for model_spec
-fit_xy(object, x = NULL, y = NULL, control = control_parsnip(), ...)
+fit_xy(object, x, y, control = control_parsnip(), ...)

Arguments

@@ -255,7 +255,7 @@

Examp using_formula
#> parsnip model object #> -#> Fit in: 28ms +#> Fit in: 26ms #> Call: stats::glm(formula = formula, family = stats::binomial, data = data) #> #> Coefficients: @@ -266,7 +266,7 @@

Examp #> Null Deviance: 4055 #> Residual Deviance: 3698 AIC: 3704

using_xy
#> parsnip model object #> -#> Fit in: 18ms +#> Fit in: 15ms #> Call: stats::glm(formula = formula, family = stats::binomial, data = data) #> #> Coefficients: diff --git a/man/fit.Rd b/man/fit.Rd index 2c284e8cb..57286fd52 100644 --- a/man/fit.Rd +++ b/man/fit.Rd @@ -5,9 +5,9 @@ \alias{fit_xy.model_spec} \title{Fit a Model Specification to a Dataset} \usage{ -\method{fit}{model_spec}(object, formula = NULL, data = NULL, control = control_parsnip(), ...) +\method{fit}{model_spec}(object, formula, data, control = control_parsnip(), ...) -\method{fit_xy}{model_spec}(object, x = NULL, y = NULL, control = control_parsnip(), ...) +\method{fit_xy}{model_spec}(object, x, y, control = control_parsnip(), ...) } \arguments{ \item{object}{An object of class \code{model_spec} that has a chosen engine