Giter Club home page Giter Club logo

Comments (4)

simonpcouch avatar simonpcouch commented on September 10, 2024 1

Wasn't sure whether to apply bug or feature, but either way, I agree that this ought to be fair game. :)

from tune.

abichat avatar abichat commented on September 10, 2024 1

Just to give another example with step_holiday(), whose holidays argument is not tunable.

library(tidyverse)
library(tidymodels)

examples <- data.frame(someday = ymd("2000-12-20") + days(0:40))

holiday_rec <- 
  recipe(~someday, examples) %>%
  step_holiday(all_predictors(), holidays = c("Easter", "ChristmasDay"))

There are 2^119 combinations of holidays (so make it tunable could be dangerous), but it would be nice if we could tune it based on a set of defined values, like this (as it's okay with list-columns now #633):

tibble(holidays = list(c("LaborDay", "NewYearsDay", "ChristmasDay"),
                       c("LaborDay", "NewYearsDay", "ChristmasDay", "Easter", "Annunciation"),
                       c("FRAllSaints", "FRBastilleDay", "FRAscension")))
# # A tibble: 3 × 1
#   holidays 
#   <list>   
# 1 <chr [3]>
# 2 <chr [5]>
# 3 <chr [3]>

Thanks!

from tune.

hfrick avatar hfrick commented on September 10, 2024

The example is motivated by tidymodels/dials#154

from tune.

simonpcouch avatar simonpcouch commented on September 10, 2024

A bit more context from poking at this for a moment...

tune_args() methods are intended to return arguments marked for tuning, tunable() methods are intended to return arguments marked for tuning that we can associated dials parameter information with. In some places, tune_args() methods more closely resemble tunable() methods, making it difficult for tune to handle custom grids in a principled way. In theory, if a user provides their own grid, then we should be able to rely only on tune_args() methods when running tune_grid(). In that case, tune_grid() takes care of collecting and then injecting each needed values and recipes and/or parsnip never need to know they're handling tuning parameters.

So, step 1 is to disambiguate tune_args() and tunable() in implementations. :)

from tune.

Related Issues (20)

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.