tidymodels / dials

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

no space filling designs for low dimensions #337

Closed topepo closed 4 months ago

topepo commented 4 months ago

From tidymodels/tune#919

library(dials)
#> Loading required package: scales

grid_space_filling(parameters(neighbors()), size = 1)
#> Error in Distance[i, k]: subscript out of bounds
grid_space_filling(parameters(neighbors(), mixture()), size = 1)
#> Error in DiceDesign::dmaxDesign(n = size, dimension = length(params), : Warning : the number of points is lower than the dimension.

# but: 

grid_space_filling(parameters(neighbors()), size = 1, type = "latin_hypercube")
#> # A tibble: 1 × 1
#>   neighbors
#>       <int>
#> 1         3
grid_space_filling(parameters(neighbors(), mixture()), size = 1, type = "latin_hypercube")
#> # A tibble: 1 × 2
#>   neighbors mixture
#>       <int>   <dbl>
#> 1         1   0.973

Created on 2024-07-18 with reprex v2.1.0