View source: R/parameterSets.R
parameterSets | R Documentation |
Generate parameter sets from given ranges, with chosen sampling scheme
parameterSets(par.ranges, samples, method = c("sobol", "innergrid", "grid"))
par.ranges |
A named list of minimum and maximum parameter values |
samples |
Number of samples to generate. For the |
method |
the sampling scheme; see Details |
Method "sobol"
generates uniformly distributed Sobol low discrepancy numbers,
using the sobol function in the randtoolbox package.
Method "grid"
generates a grid within the parameter ranges, including its extremes,
with number of points determined by samples
Method "innergrid"
generates a grid within the parameter ranges, with edges
of the grid offset from the extremes. The offset is calculated as half
of the resolution of the grid diff(par.ranges)/samples/2
.
the result is a matrix
, with named columns for each parameter in par.ranges
.
Each row represents one parameter set.
Joseph Guillaume, based on similar function by Felix Andrews
delsa
, which uses this function
X.grid <- parameterSets(par.ranges=list(V1=c(1,1000),V2=c(1,4)),
samples=c(10,10),method="grid")
plot(X.grid)
X.innergrid<-parameterSets(par.ranges=list(V1=c(1,1000),V2=c(1,4)),
samples=c(10,10),method="innergrid")
points(X.innergrid,col="red")
library(randtoolbox)
X.sobol<-parameterSets(par.ranges=list(V1=c(1,1000),V2=c(1,4)),
samples=100,method="sobol")
plot(X.sobol)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.