optimal_experimental_design

pyapprox.expdesign.optimal_experimental_design(design_pts, fun, criteria, regression_type='lstsq', noise_multiplier=None, solver_opts=None, pred_factors=None, cvar_tol=None)[source]

Compute optimal experimental designs for models of the form

\[y(\rv)=m(\rv;\theta)+\eta(\rv)\epsilon\]

to be used with estimators, such as least-squares and quantile regression, to find approximate parameters \(\hat{\theta}\) that are the solutions of

\[\mathrm{argmin}_\theta \frac{1}{M}\sum_{i=1}^M e(y_i-m(\rv_i;\theta))\]

for some loss function \(e\)

Parameters:
design_ptsnp.ndarray (nvars,nsamples)

All possible experimental conditions

design_factorscallable or np.ndarray

The function \(m(\rv;\theta)\) with the signature

design_factors(z,p)->np.ndarray

where z are the design points and p are the unknown parameters of the function which will be estimated from data collected using the optimal design

A np.ndarray with shape (nsamples,nfactors) where each column is the jacobian of \(m(\rv,\theta)\) for some \(\theta\)

criteriastring

The optimality criteria. Supported criteria are

  • 'A'

  • 'D'

  • 'C'

  • 'I'

  • 'R'

  • 'G'

The criteria I,G and R require pred_factors to be provided. A, C and D optimality do not. R optimality requires cvar_tol to be provided.

See [KJHSIAMUQ2020] for a definition of these criteria

regression_typestring

The method used to compute the coefficients of the linear model. This defines the loss function \(e\). Currently supported options are

  • 'lstsq'

  • 'quantile'

Both these options will produce the same design if noise_multiplier is None

noise_multipliernp.ndarray (nsamples)

An array specifying the noise multiplier \(\eta\) at each design point

solver_optsdict

Options passed to the non-linear optimizer which solves the OED problem

pred_factorscallable or np.ndarray

The function \(g(\rv;\theta)\) with the signature

design_factors(z,p)->np.ndarray

where z are the prediction points and p are the unknown parameters

A np.ndarray with shape (nsamples,nfactors) where each column is the jacobian of \(g(\rv,\theta)\) for some \(\theta\)

cvar_tolfloat

The \(0\le\beta<1\) quantile defining the R-optimality criteria. When \(\beta=0\), I and R optimal designs will be the same.

Returns:
final_design_ptsnp.ndarray (nvars,nfinal_design_pts)

The design points used in the experimental design

nrepetitionsnp.ndarray (nfinal_design_pts)

The number of times to evaluate the model at each design point

References

[KJHSIAMUQ2020]

D.P. Kouri, J.D. Jakeman, G. Huerta, Risk-Adapted Optimal Experimental Design.