Skip to content
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

Add an article with minimal examples #527

Merged
merged 19 commits into from
Jul 19, 2021
Merged

Add an article with minimal examples #527

merged 19 commits into from
Jul 19, 2021

Conversation

hfrick
Copy link
Member

@hfrick hfrick commented Jul 8, 2021

Closes #519

This PR adds an article with minimal examples for fitting and predicting.

Note that this currently sets

development:
  mode: release

so that the site gets build and deployed to https://parsnip.tidymodels.org - this means that the site that will be online does include any changes which are part of the devel version of the pkg rather than just the CRAN version. The header of the site should indicate that it's the devel version via the version number.

We'll change the mode back to

development:
  mode: auto

after this PR but the site will stay like this until the next CRAN release.

To add more examples, add a

  <details id="model-spec-engine"> 
  </details>

section to the vignettes/articles/Example.Rmd. The indentation is necessary for the section to be properly collapsed in the pkgdown site. For the id, the convention is model-spec-engine where any capitalization in the engine name is kept, e.g., id="svm-linear-LiblineaR". The id is used on the <model_engine>.Rmd help pages to link to the relevant section in the article.

@juliasilge
Copy link
Member

Addresses #519

@topepo
Copy link
Member

topepo commented Jul 11, 2021

I suggest trying to avoid links for function names in the section headings. It is easy to click on those when trying to expand a section and be taken to the function's man page.

Maybe use

<summary><tt>multinom_reg()</tt> with the `"glmnet"` engine</summary>

instead of

<summary>`multinom_reg()` with the `"glmnet"` engine</summary>

(or some way to avoid pkgdown doing the links)

`multinom_reg()`: nnet, keras
`mlp()`: nnet, keras
`mars()`: earth
`logistic_reg()`: glm, glmnet, keras, LiblineaR, stan
`linear_reg()`: lm, glmnet, keras, stan
`decision_tree()`: rpart, C5.0
`boost_tree()`: xgboost, C5.0
@hfrick hfrick marked this pull request as ready for review July 14, 2021 11:49
@hfrick
Copy link
Member Author

hfrick commented Jul 14, 2021

There are now examples for all model/engine combinations with the exception of survival models and spark engines.

@hfrick hfrick requested a review from topepo July 14, 2021 17:32
Copy link
Member

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add this info yet again here in this bit of documentation, just briefly.

vignettes/articles/Examples.Rmd Outdated Show resolved Hide resolved
vignettes/articles/template-cls-multi-class.R Outdated Show resolved Hide resolved
hfrick and others added 2 commits July 16, 2021 09:36
Co-authored-by: Julia Silge <julia.silge@gmail.com>
Co-authored-by: Julia Silge <julia.silge@gmail.com>
@topepo topepo merged commit a8f1cd6 into master Jul 19, 2021
@topepo topepo deleted the article-examples branch July 19, 2021 14:04
@github-actions
Copy link

github-actions bot commented Aug 3, 2021

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add fitting and prediction examples to pkgdown
3 participants