Model Tuning Patterns

Automate hyperparameter optimization for tidymodels workflows using grid, Bayesian, and racing strategies.

9|1|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/choxos/BiostatAgent --skill model-tuning-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Model Tuning Patterns
Source: https://github.com/choxos/BiostatAgent/tree/main/plugins/r-tidy-modeling/skills/model-tuning
Command: npx skills add https://github.com/choxos/BiostatAgent --skill model-tuning-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamline hyperparameter optimization for tidymodels pipelines, reducing manual trial-and-error and accelerating model deployment.

Core Features & Use Cases

  • Grid search across mtry, min_n, and trees to identify strong defaults for random forests and boosted trees.
  • Bayesian optimization with tune_bayes to efficiently explore promising regions of the parameter space.
  • Racing and adaptive strategies such as tune_race_anova and tune_race_win_loss to quickly discard poor configurations.
  • Real-world scenario: tuning a regression model to maximize roc_auc or rsq on cross-validated splits, then finalizing the best workflow.

Quick Start

Run a simple grid search on your tidymodels workflow to find the best mtry and min_n for a classification task.

Frequently Asked Questions about Model Tuning Patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate hyperparameter tuning for tidymodels workflows?

Automate hyperparameter tuning for tidymodels workflows by coordinating grid, random, Bayesian, and racing strategies to explore parameters like mtry and min_n across regression and classification models.

What is the best way to use Bayesian optimization with tidymodels?

Bayesian optimization with tidymodels uses tune_bayes to efficiently explore promising regions of the parameter space, reducing manual trial-and-error when tuning parsnip model specifications.

Does tidymodels support racing strategies for hyperparameter tuning?

Tidymodels supports racing strategies for hyperparameter tuning through tune_race_anova and tune_race_win_loss, which quickly discard poor configurations to accelerate the optimization pipeline.

Can I tune random forest parameters like mtry and trees using parsnip?

You can tune random forest parameters like mtry, min_n, and trees using parsnip by running grid search across cross-validated splits to identify strong default configurations.

How do I finalize the best tidymodels workflow after tuning?

Finalize the best tidymodels workflow after tuning by selecting the configuration that maximizes metrics like roc_auc or rsq on resamples, then applying it to your model for deployment.