SALib.util package

Submodules

SALib.util.results module

class SALib.util.results.ResultDict(*args, **kwargs)[source]

Bases: dict

Dictionary holding analysis results.

Conversion methods (e.g. to Pandas DataFrames) to be attached as necessary by each implementing method

to_df()[source]

Convert dict structure into Pandas DataFrame.

Module contents

A set of utility functions

SALib.util.scale_samples(params, bounds)[source]

Rescale samples in 0-to-1 range to arbitrary bounds

Parameters:
  • bounds (list) – list of lists of dimensions num_params-by-2
  • params (numpy.ndarray) – numpy array of dimensions num_params-by-N, where N is the number of samples
SALib.util.read_param_file(filename, delimiter=None)[source]

Unpacks a parameter file into a dictionary

Reads a parameter file of format:

Param1,0,1,Group1,dist1
Param2,0,1,Group2,dist2
Param3,0,1,Group3,dist3

(Group and Dist columns are optional)

Returns a dictionary containing:
  • names - the names of the parameters
  • bounds - a list of lists of lower and upper bounds
  • num_vars - a scalar indicating the number of variables
    (the length of names)
  • groups - a list of group names (strings) for each variable
  • dists - a list of distributions for the problem,
    None if not specified or all uniform
Parameters:
  • filename (str) – The path to the parameter file
  • delimiter (str, default=None) – The delimiter used in the file to distinguish between columns
class SALib.util.ResultDict(*args, **kwargs)[source]

Bases: dict

Dictionary holding analysis results.

Conversion methods (e.g. to Pandas DataFrames) to be attached as necessary by each implementing method

to_df()[source]

Convert dict structure into Pandas DataFrame.

SALib.util.avail_approaches(pkg)[source]

Create list of available modules.

Parameters:pkg (module) – module to inspect
Returns:method – A list of available submodules
Return type:list