From 26ce886bd92f9b8d03940238a3bde5afc59b9f90 Mon Sep 17 00:00:00 2001 From: Cory Brunson Date: Sat, 2 Nov 2024 15:41:50 -0400 Subject: [PATCH 1/2] fix likely typo 'linear_reg' in 'logistic_reg' documentation This example illustrates a non-default model family in an apparent wrong model type, which does not produce an error so would not have been caught during checks. I apologize if the use of `linear_reg()` was intended, but in that case it should probably be explained. --- man/rmd/logistic_reg_glm.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/rmd/logistic_reg_glm.Rmd b/man/rmd/logistic_reg_glm.Rmd index 55f623eb1..71dba836b 100644 --- a/man/rmd/logistic_reg_glm.Rmd +++ b/man/rmd/logistic_reg_glm.Rmd @@ -18,7 +18,7 @@ logistic_reg() %>% To use a non-default `family` and/or `link`, pass in as an argument to `set_engine()`: ```{r glm-reg-engine} -linear_reg() %>% +logistic_reg() %>% set_engine("glm", family = stats::binomial(link = "probit")) %>% translate() ``` From b24698ed6d23a9aabc0f800f7a7df4ba32373811 Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Thu, 7 Nov 2024 14:21:45 -0600 Subject: [PATCH 2/2] `knit_engine_docs()` and `document()` --- man/details_logistic_reg_glm.Rd | 4 ++-- man/rmd/logistic_reg_glm.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/man/details_logistic_reg_glm.Rd b/man/details_logistic_reg_glm.Rd index d56803e06..b632fcc2b 100644 --- a/man/details_logistic_reg_glm.Rd +++ b/man/details_logistic_reg_glm.Rd @@ -35,12 +35,12 @@ parameter (and/or \code{link}) as an engine argument (see below). To use a non-default \code{family} and/or \code{link}, pass in as an argument to \code{set_engine()}: -\if{html}{\out{
}}\preformatted{linear_reg() \%>\% +\if{html}{\out{
}}\preformatted{logistic_reg() \%>\% set_engine("glm", family = stats::binomial(link = "probit")) \%>\% translate() }\if{html}{\out{
}} -\if{html}{\out{
}}\preformatted{## Linear Regression Model Specification (regression) +\if{html}{\out{
}}\preformatted{## Logistic Regression Model Specification (classification) ## ## Engine-Specific Arguments: ## family = stats::binomial(link = "probit") diff --git a/man/rmd/logistic_reg_glm.md b/man/rmd/logistic_reg_glm.md index c7942c741..5687e442e 100644 --- a/man/rmd/logistic_reg_glm.md +++ b/man/rmd/logistic_reg_glm.md @@ -10,7 +10,7 @@ This engine has no tuning parameters but you can set the `family` parameter (and ## Translation from parsnip to the original package -```r +``` r logistic_reg() %>% set_engine("glm") %>% translate() @@ -29,14 +29,14 @@ logistic_reg() %>% To use a non-default `family` and/or `link`, pass in as an argument to `set_engine()`: -```r -linear_reg() %>% +``` r +logistic_reg() %>% set_engine("glm", family = stats::binomial(link = "probit")) %>% translate() ``` ``` -## Linear Regression Model Specification (regression) +## Logistic Regression Model Specification (classification) ## ## Engine-Specific Arguments: ## family = stats::binomial(link = "probit")