tidymodels / dials

Tools for creating tuning parameter values
https://dials.tidymodels.org/
Other
111 stars 26 forks source link

Why do grid_latin_hypercube and grid_max_entropy return object of only class tibble? #100

Closed cimentadaj closed 4 years ago

cimentadaj commented 4 years ago

The problem

I'm having trouble understanding why grid_latin_hypercube and grid_max_entropy only return objects of class tibble (and data frame, etc..) when grid_regular and grid_random return objects with custom classes of param_grid. I'm planing to create methods for tuning grids and I stumbled into this. Is this a design choice?

Have you considered adding a custom class to these two tuning grids as well?

Reproducible example

library(dials)
#> Loading required package: scales
class(grid_latin_hypercube(penalty(), mixture()))
#> [1] "tbl_df"     "tbl"        "data.frame"
class(grid_max_entropy(penalty(), mixture()))
#> [1] "tbl_df"     "tbl"        "data.frame"

# Whereas grid_regular and grid_random do have
class(grid_random(penalty(), mixture()))
#> [1] "grid_random" "param_grid"  "tbl_df"      "tbl"         "data.frame"
class(grid_regular(penalty(), mixture()))
#> [1] "grid_regular" "param_grid"   "tbl_df"       "tbl"          "data.frame"
topepo commented 4 years ago

It was an oversight; corrected in 611260d

github-actions[bot] commented 3 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.