This function samples the parameter space using Latin Hypercube Sampling (LHS).
Arguments
- par
A matrix or data frame specifying the parameter ranges.
- n
The number of samples to generate.
Examples
# Define parameter ranges
parameters <- data.frame(
param1 = c(0, 1),
param2 = c(0, 2),
param3 = c(0, 10)
)
# Sample the parameter space
sample_space <- sample_lhs(parameters, 3)
sample_space
#> # A tibble: 3 × 3
#> param1 param2 param3
#> <dbl> <dbl> <dbl>
#> 1 0.860 0.505 1.78
#> 2 0.0951 0.854 5.54
#> 3 0.356 1.67 6.90