Unif: Uniform Random Distribution

View source: R/Unif.R

UnifR Documentation

Uniform Random Distribution

Description

Generates uniformly distributed random parameter sets.

Usage

Unif(parRange, num)

Arguments

parRange

the range (min, max) of the parameters, a matrix or a data.frame with one row for each parameter, and two columns with the minimum (1st) and maximum (2nd) value.

num

the number of random parameter sets to generate.

Details

In the uniform sampling, each parameter is uniformly random distributed over its range.

Value

a matrix with one row for each generated parameter set, and one column per parameter.

Note

For small sample sizes, the latin hypercube distributed parameter sets (Latinhyper) may give better coverage in parameter space than the uniform random design.

Author(s)

Karline Soetaert <karline.soetaert@nioz.nl>

See Also

Norm for (multi)normally distributed random parameter sets.

Latinhyper to generates parameter sets using latin hypercube sampling.

Grid to generate random parameter sets arranged on a regular grid

runif the R-default for generating uniformally distributed random numbers.

Examples

## 4 parameters
parRange <- data.frame(min = c(0, 1, 2, 3), max = c(10, 9, 8, 7))
rownames(parRange) <- c("par1", "par2", "par3", "par4")

## uniform
pairs(Unif(parRange, 100), main = "Uniformly random")

FME documentation built on July 9, 2023, 5:59 p.m.