WorkTracker

class pyapprox.models.wrappers.WorkTracker[source]

Bases: object

Store the cost needed to evaluate a function under different configurations, e.g. mesh resolution of a finite element model used to solve a PDE.

Methods Summary

__call__(config_samples)

Read the cost of evaluating the functions with the ids given in a set of config_samples.

update(config_samples, costs)

Update the cost of evaluating the functions with the ids given in a set of config_samples.

Methods Documentation

__call__(config_samples)[source]

Read the cost of evaluating the functions with the ids given in a set of config_samples.

Parameters
config_samplesnp.ndarray (nconfig_vars,nsamples)

The configuration indices

update(config_samples, costs)[source]

Update the cost of evaluating the functions with the ids given in a set of config_samples.

Parameters
config_samplesnp.ndarray (nconfig_vars,nsamples)

The configuration indices

costsnp.ndarray (nsamples)

The costs of evaluating the function index by each index in config_samples