6.1. pyopus.design.sensitivity
— Finite difference sensitivity computation and parameter screening¶
Sensitivity analysis (PyOPUS subsystem name: SENS)
Uses finite differences to estimate the sensitivities of performance measures to input parameters.

class
pyopus.design.sensitivity.
Sensitivity
(evaluator, paramDesc, paramNames, debug=0, diffType=0, relPerturb=0.1, absPerturb=None, spawnerLevel=1)¶ Callable object that computes sensitivities.
See
PerformanceEvaluator
for details on evaluator.The parameters are given by a dictionary paramDesc where parameter name is the key. One entry in this dictionary corresponds to one parameter. Every entry is a dictionary with the following members
 lo .. lower bound
 hi .. upper bound
paramDesc can be a list in which case the complete set of parameters is the union of parameters specified by list memebers.
paramNames specifies the order of parameters in the sensitivity vector.
Setting debug to a value greater than 0 turns on debug messages. The verbosity is proportional to the specified number.
diffType is the finite difference type (0=central, 1=forward, 2=backward)
relPerturb specifies the relative perturbation with respet to the allowed parameter span given by lo and hi.
absPerturb overrides relPerturb. It specifies the absolute perturbation of the parameters.
If relPerturb (or absPerturb) is scalar the same perturbation is applied to all parameters. If it is a vector its components specify the perturbations of individual parameters in the order given by paramNames.
If spawnerLevel is not greater than 1 the evaluations of perturbed points are dispatched to available computing nodes.
The number of circuit evaluations is stored in the neval member.
Calling convention: obj(x0) where x0 is a vector of parameters specifying the point where the sensitivity should be computed. The components represent parameters in the order specified by paramNames. The sensitivities are computed at x0.
Returns a tuple with performance deltas as the first member, the parameter perturbations as the second member, and the analysisCount dictionary as the third member.
The performance deltas are returned in a double dictionary where the first index is the performance measure name and the second index is the corner name.
Every performance delta is a vector whose components correspond to parameters in the order given by paramNames. The vector holds the perturbations for one performance measure in one corner. If the computation of a performance delta for some parameter perturbation fails (i.e. any of the points required for computing the performance delta fail to produce a valid result) the corresponding component of the vector is
NaN
.Dividing performance deltas by parameter perturbations results in the sesitivities. This holds regardless of the type of perturbation specified with diffType.
The performance deltas are stored in the results member. The parameter perturbations are stored in the delta member.
Objects of this type store the number of analyses performed during the last call to the object in the analysisCount member.

screen
(contribThreshold=0.01, cumulativeThreshold=0.25, useSens=False, squared=True)¶ Performs parameter screening. Returns a double dictionary with performance measure name as the first index and corner name as the second index. Every entry is a dictionary containing two vectors of indices. The first vector (named out) lists the indices of parameters with small influence. The second one (named in) lists the remaining indices. The indices are ordered by absolute sensitivity from the smallest to the largest.
A parameter is considered to have low influence if its relative contribution is below contribThreshold. The relative cumulative contribution of the set of parameters with low influence may not exceed cumulativeThreshold.
If useSens is set to
True
the performance measure semnsitivities are used instead of deltas. This makes sense only if all parameters are expressed in the same units.If squared is set to
False
the absolute sensitivities are used instead of squared sensitivities in the computation of the relative influence.