Skip to content

Add a tidymodels tutorial #23

Description

@davidkane9

Focus is on the tidymodels book at: https://www.tmwr.org/. Main focus is just the basic structure of how a model is put together and the reasons behind various choices/engines. What are other options besides linear_reg()? What are different engines? Cover all the models that we use: linear, logistic, multinomial, ordered. Mention the dangers of overfitting in a couple of knowledge drops, but do not spend time in training/testing data. (Although we might consider a tidymodels-2 which did cover this stuff.) Some more notes:

Ordered outcomes

We no longer need to use polr. Instead:

parsnip has a new model type, ordinal_reg(), analogous to multinom_reg(), for fitting various generalized linear models with ordered class levels.

The ordered package by Cory Brunson is now on CRAN. This contains the specific engine code for these models, including:

ordinal_reg(): three engines: "polr", "ordinalNet", and "vglm".
gen_additive_mod(): "vgam"
decision_tree(): "rpartScore"
rand_forest(): "ordinalForest"

These models can be fitted, tuned, and evaluated with tidymodels. For the evaluation, we’ve added a specific performance metric for ordered categories: the ranked probability score (RPS). The function ranked_prob_score() is in the new yardstick release and requires an ordered factor for the outcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions