Categorical Latin Hypercube Sampling Plan
Categorical Latin Hypercube plans allows one to mix discrete and continuous data in the same plan.
Example
Say we have two continuous dimensions as well as one on/off, discrete, dimension. These can be included in the same sampling plan with
julia> numPoints = 100
julia> catWeight = 0.01
julia> dims = [Continuous(),Continuous(),Categorical(2,catWeight)]
julia> initialSample = randomLHC(numPoints,dims)
julia> X = LHCoptim!(initialSample,gens;dims=dims)[1]
This is no longer strictly a Latin Hypercube because of the introduction of categorical values.
The Audze-Eglais objective function is altered to include the separation within each plane of the categorical values in addition to the separation between all points. It's possible to weight each objective separately so the user can achieve their desired sampling plan. The objective function is calculated as the sum of the Audze-Eglais function between all points and the Audze-Eglais function within each category.
The weights for each categorical plane can be supplied by the user through the Categorical type Categorical(numCategories,catWeight)
. Similarly the weight controlling the separation between all points can be accessed by the user through the optional argument interSampleWeight
which is set to 1 by default.
Large emphasis can be put on keeping the separation within each plane by increasing its weight. This is similar to doing a separate LHC for each categorical dimension.
julia> catWeight = 1000.0
julia> dims = [Continuous(),Continuous(),Categorical(2,catWeight)]
julia> julia> X = LHCoptim!(initialSample,gens;dims=dims)[1]
Similarly we can turn of the separation within planes entirely with
julia> catWeight = 0.0
julia> dims = [Continuous(),Continuous(),Categorical(2,catWeight)]
julia> X = LHCoptim!(initialSample,gens;dims=dims)[1]