Git Product home page Git Product logo

recipes's Introduction

recipes

R-CMD-check Codecov test coverage CRAN_Status_Badge Downloads lifecycle

Introduction

With recipes, you can use dplyr-like pipeable sequences of feature engineering steps to get your data ready for modeling. For example, to create a recipe containing an outcome plus two numeric predictors and then center and scale (“normalize”) the predictors:

library(recipes)
data(ad_data, package = "modeldata")

ad_rec <- recipe(Class ~ tau + VEGF, data = ad_data) %>%
  step_normalize(all_numeric_predictors())

ad_rec
#> Data Recipe
#> 
#> Inputs:
#> 
#>       role #variables
#>    outcome          1
#>  predictor          2
#> 
#> Operations:
#> 
#> Centering and scaling for all_numeric_predictors()

More information on recipes can be found at the Get Started page of tidymodels.org.

You may consider recipes as an alternative method for creating and preprocessing design matrices (also known as model matrices) that can be used for modeling or visualization. While R already has long-standing methods for creating such matrices (e.g. formulas and model.matrix), there are some limitations to what the existing infrastructure can do.

Installation

There are several ways to install recipes:

# The easiest way to get recipes is to install all of tidymodels:
install.packages("tidymodels")

# Alternatively, install just recipes:
install.packages("recipes")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidymodels/recipes")

Contributing

This project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

recipes's People

Contributors

alexpghayes avatar ashesitr avatar batpigandme avatar davisvaughan avatar dfalbel avatar dimagor avatar edwinth avatar emilhvitfeldt avatar ewv88 avatar gadenbuie avatar gdequeiroz avatar gregdenay avatar hfrick avatar holymiracle avatar jakubkovac avatar jkennel avatar jrnold avatar juliasilge avatar klahrich avatar lawwu avatar lionel- avatar mattwarkentin avatar meztez avatar raymondbalise avatar rorynolan avatar smingerson avatar terrytangyuan avatar tmastny avatar topepo avatar ttzhou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.