Description Usage Arguments Value Examples
minimax.map
computes minimax designs on a user-provided binary (0-1) image, using the minimax clustering algorithm in Mak and Joseph (2018).
1 2 3 4 | minimax.map(N,img,p=2,q=10,
params_pso=list(w=0.72,c1=1.49,c2=1.49),
npart=5,nclust=1e5,neval=nclust,
itmax_pso=50,itmax_pp=100,itmax_inn=1e4,jit=0.1/sqrt(N))
|
N |
Number of design points. |
img |
A binary 0-1 matrix, with 1 indicating the desired design region. |
p |
Dimension of design region. |
q |
Power parameter for approximating the minimax criterion (see paper for details). Larger values of q give a better approximation, but may cause numerical instability. |
params_pso |
Particle swarm optimization parameters (particle momentum (w), local-best velocity (c1) and global-best velocity (c2)). |
npart |
Number of particles for particle swarm optimization. |
nclust,neval |
Number of sample points for minimax clustering and post-processing. |
itmax_pso,itmax_pp,itmax_inn |
Maximum number of iterations for minimax clustering, post-processing and inner optimization. |
jit |
Jitter radius for post-processing. |
An N
-by-p
matrix for the minimax design.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
#20-point minimax design on the hypercube [0,1]^2
library(jpeg)
n <- 25
img <- readJPEG(system.file("img", "gamap.jpg", package="minimaxdesign"))[,,1]
image(t(img)[,nrow(img):1],col=gray.colors(12,start=0.6),main="Georgia")
img <- t(img)[,nrow(img):1] #Invert image due to reading distortion
des <- minimax.map(n,img)
points(des,pch=16)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.