# minimax: Compute minimax designs using clustering on constrained... In minimaxdesign: Minimax and Minimax Projection Designs

## Description

`minimax` computes minimax designs using the minimax clustering algorithm in Mak and Joseph (2018). Current design region options include the unit hypercube ("hypercube"), the unit simplex ("simplex"), the unit ball ("ball"), the inequality-constrained unit hypercube ("ineq"), and custom clustering points ("custom").

## Usage

 ```1 2 3 4``` ```minimax(N,p,q=10,region="hypercube",ini=NA,const=NA,clust_pts=NA, 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)) ```

## Arguments

 `N` Number of design points. `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. `region` String for desired design region. Current options include "hypercube", "simplex", "ball", "ineq" and "custom". `ini` String for initial design. Current choices include NA (automatic choice), "sobol" (Sobol' sequence), and "ff" (fractional factorial). `const` Function for desired constraints (inequalities) on design space. See examples for implementation. `clust_pts` Custom clustering points (used only if `region` == "custom"). `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.

## Value

An `N`-by-`p` matrix for the minimax design.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39``` ```## Not run: #20-point minimax design on the hypercube [0,1]^2 D <- minimax(N=20,p=2) plot(NULL,xlim=c(0,1),ylim=c(0,1),xlab="x1",ylab="x2") #set up plot polygon(c(0,0,1,1),c(0,1,1,0),col="gray") #design space points(D,xlim=c(0,1),ylim=c(0,1),xlab="x1",ylab="x2",pch=16) #design points mM <- mMdist(D) mM\$dist #minimax (fill) distance lines(rbind(mM\$far.pt,mM\$far.despt),col="red",lty=2,lwd=2) #plot farthest point #20-point minimax design on design space [0,1]^2 constrained by given inequalities ineqs <- function(xx){ #user-defined inequalities bool.vec <- rep(TRUE,2) bool.vec[1] <- (xx[2]<=2-2*xx[1]) #inequality 1: x2 <= 2 - 2*x1 bool.vec[2] <- (xx[1]>=xx[2]) #inequality 2: x1 >= x2 return(all(bool.vec)) } D <- minimax(N=20,p=2,region="ineq",const=ineqs) plot(NULL,xlim=c(0,1),ylim=c(0,1),xlab="x1",ylab="x2") #set up plot polygon(c(0,2/3,1),c(0,2/3,0),col="gray") #design space points(D,pch=16) #design points mM <- mMdist(D,region="custom",const=ineqs) mM\$dist #minimax (fill) distance lines(rbind(mM\$far.pt,mM\$far.despt),col="red",lty=2,lwd=2) #plot farthest point #20-point minimax design on custom clustering points p <- 2 NN <- 10000 clust_pts <- matrix(runif(NN*p),nrow=NN,ncol=p) D <- minimax(N=20,p=2,region="custom",clust_pts=clust_pts) plot(NULL,xlim=c(0,1),ylim=c(0,1),xlab="x1",ylab="x2") #set up plot points(clust_pts,xlim=c(0,1),ylim=c(0,1),col="gray",pch=4,cex=0.5) #clustering points points(D,xlim=c(0,1),ylim=c(0,1),xlab="x1",ylab="x2",pch=16) #design points mM <- mMdist(D,eval_pts=clust_pts) mM\$dist #minimax (fill) distance lines(rbind(mM\$far.pt,mM\$far.despt),col="red",lty=2,lwd=2) #plot farthest point ## End(Not run) ```

minimaxdesign documentation built on July 13, 2021, 1:06 a.m.