{"id":13465711,"url":"https://github.com/tidymodels/workflows","last_synced_at":"2025-05-14T18:06:46.802Z","repository":{"id":38354552,"uuid":"210882705","full_name":"tidymodels/workflows","owner":"tidymodels","description":"Modeling Workflows","archived":false,"fork":false,"pushed_at":"2025-04-25T20:33:32.000Z","size":15279,"stargazers_count":207,"open_issues_count":18,"forks_count":24,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-05-14T01:54:56.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://workflows.tidymodels.org/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidymodels.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-25T15:45:32.000Z","updated_at":"2025-04-25T20:28:26.000Z","dependencies_parsed_at":"2023-12-13T00:31:04.976Z","dependency_job_id":"dcab47c5-09b6-4065-b344-2f99f8ada1d2","html_url":"https://github.com/tidymodels/workflows","commit_stats":{"total_commits":344,"total_committers":9,"mean_commits":38.22222222222222,"dds":"0.19476744186046513","last_synced_commit":"1413997d256cb0e4206211f5875615434317be85"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fworkflows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fworkflows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fworkflows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fworkflows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidymodels","download_url":"https://codeload.github.com/tidymodels/workflows/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254099824,"owners_count":22014774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:00:34.224Z","updated_at":"2025-05-14T18:06:41.789Z","avatar_url":"https://github.com/tidymodels.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# workflows \u003ca href='https://workflows.tidymodels.org'\u003e\u003cimg src='man/figures/logo.png' alt = 'A teal-colored hexagonal logo. The word WORKFLOWS is centered inside of a diagram of circular cycle, with a magrittr pipe on the top and a directed graph on the bottom.' align=\"right\" height=\"139\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![Codecov test coverage](https://codecov.io/gh/tidymodels/workflows/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/workflows?branch=main)\n[![R-CMD-check](https://github.com/tidymodels/workflows/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidymodels/workflows/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\n## What is a workflow? \n\nA workflow is an object that can bundle together your pre-processing, modeling, and post-processing requests. For example, if you have a `recipe` and `parsnip` model, these can be combined into a workflow. The advantages are:\n\n * You don't have to keep track of separate objects in your workspace.\n\n * The recipe prepping, model fitting, and postprocessor estimation (which may include data splitting) can be executed using a single call to `fit()`.\n\n * If you have custom tuning parameter settings, these can be defined using a simpler interface when combined with [tune](https://github.com/tidymodels/tune).\n \n## Installation\n\nYou can install workflows from CRAN with:\n\n``` r\ninstall.packages(\"workflows\")\n```\n\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"pak\")\npak::pak(\"tidymodels/workflows\")\n```\n \n## Example\n\nSuppose you were modeling data on cars. Say...the fuel efficiency of 32 cars. You know that the relationship between engine displacement and miles-per-gallon is nonlinear, and you would like to model that as a spline before adding it to a Bayesian linear regression model. You might have a recipe to specify the spline:\n\n```{r spline-rec, eval = FALSE}\nlibrary(recipes)\nlibrary(parsnip)\nlibrary(workflows)\n\nspline_cars \u003c- recipe(mpg ~ ., data = mtcars) %\u003e% \n  step_ns(disp, deg_free = 10)\n```\n\nand a model object:\n\n```{r car-mod, eval = FALSE}\nbayes_lm \u003c- linear_reg() %\u003e% \n  set_engine(\"stan\")\n```\n\nTo use these, you would generally run:\n\n```{r car-fit, eval = FALSE}\nspline_cars_prepped \u003c- prep(spline_cars, mtcars)\nbayes_lm_fit \u003c- fit(bayes_lm, mpg ~ ., data = juice(spline_cars_prepped))\n```\n\nYou can't predict on new samples using `bayes_lm_fit` without the prepped version of `spline_cars` around. You also might have other models and recipes in your workspace. This might lead to getting them mixed-up or forgetting to save the model/recipe pair that you are most interested in.\n\nworkflows makes this easier by combining these objects together:\n\n```{r wflow, eval = FALSE}\ncar_wflow \u003c- workflow() %\u003e% \n  add_recipe(spline_cars) %\u003e% \n  add_model(bayes_lm)\n```\n\nNow you can prepare the recipe and estimate the model via a single call to `fit()`:\n\n```{r wflow-fit, eval = FALSE}\ncar_wflow_fit \u003c- fit(car_wflow, data = mtcars)\n```\n\nYou can alter existing workflows using `update_recipe()` / `update_model()` and `remove_recipe()` / `remove_model()`.\n\n\n## Contributing\n\nThis project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n\n- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on Posit Community](https://community.rstudio.com/new-topic?category_id=15\u0026tags=tidymodels,question).\n\n- If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/workflows/issues).\n\n- Either way, learn how to create and share a [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) (a minimal, reproducible example), to clearly communicate about your code.\n\n- Check out further details on [contributing guidelines for tidymodels packages](https://www.tidymodels.org/contribute/) and [how to get help](https://www.tidymodels.org/help/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidymodels%2Fworkflows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidymodels%2Fworkflows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidymodels%2Fworkflows/lists"}