Skip to content

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

Description

@cimentadaj

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions