MultiIndexModel

class pyapprox.interface.MultiIndexModel(setup_model, config_values)[source]

Bases: object

Define a multi-index model to be used for multi-index collocation

Parameters:
setup_modelcallable

Function with the signature

setup_model(config_values) -> model_instance

where config_values np.ndarray (nconfig_vars, 1) defines the numerical resolution of model instance where model instance is a callable with the signature

setup_model(random_samples) -> np.ndarray (nsamples, nqoi)

where random_samples is np.ndarray (nvars, nsamples).

config_values2d list [nconfig_vars, nconfig_values_i]

Contains the possible model discretization values for each config var, e.g. [[100, 200], [0.1, 0.2, 0.3]] would be use to specify a 1D spartial mesh with 100 elements or 200 elements and time step sizes of [0.1, 0.2, 0.3]

Methods Summary

__call__(samples)

Parameters:

Methods Documentation

__call__(samples)[source]
Parameters:
samplesnp.ndarray (nvars+nconfig_vars, nsamples)

Each row is the concatenation of a random sample and a configuration sample.

Returns:
valuesnp.ndarray (nsamples, nqoi)

Evaluations of the model at the samples.