Learn R Programming

GADGET (version 0.2.0)

space_eval: Evaluate Design Criterion on LHS

Description

This function simplifies the evaluation of design criteria on space-filling designs (matrices where each row is a possible design). The design criterion is parallelized as well using the parallel package. A progress bar gives a visual indicator when the design criterion is expensive.

Usage

space_eval(lhs, criterion, cluster = NULL)

Arguments

lhs

A matrix with n rows and d columns.

criterion

A function with vector input of length d.

cluster

A parallel cluster object.

Value

A row vector of length n.

Details

Only univariate design criteria can be optimized GADGET currently.

Examples

Run this code
# NOT RUN {
my_lhs   <- space_fill(c(0,0),c(10,10),20)
dc       <- function(x){sum(x^2)}
response <- space_eval(my_lhs,dc)
print(response) 

# }

Run the code above in your browser using DataLab