pulsatrix 1.1.0
Loading...
Searching...
No Matches
global_sensitivity.hpp File Reference

Global sensitivity analysis: Morris elementary effects and Sobol indices (CFS-4). More...

#include <cstdint>
#include <functional>
#include <string>
#include <vector>
#include "pulsatrix/tensor.hpp"
Include dependency graph for global_sensitivity.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pulsatrix::GlobalSensitivityProblem
 The input space to explore: which features vary, over which ranges. Every other feature keeps its value from base. More...
 
struct  pulsatrix::MorrisResult
 Morris screening results, one entry per varied feature (SALib's morris.analyze). More...
 
struct  pulsatrix::MorrisOptions
 Morris settings. More...
 
struct  pulsatrix::SobolResult
 Sobol indices, one entry per varied feature (SALib's sobol.analyze, first and total order). More...
 
struct  pulsatrix::SobolOptions
 Sobol settings. More...
 

Namespaces

namespace  pulsatrix
 

Functions

std::vector< std::vector< float > > pulsatrix::MorrisSample (const GlobalSensitivityProblem &problem, const MorrisOptions &options={})
 Morris trajectories (Morris 1991): each starts at a random grid point and moves one feature at a time, in a random order, by the Morris step. Rows are feature values in the problem's ranges, (num_features + 1) per trajectory.
 
MorrisResult pulsatrix::AnalyzeMorris (const std::vector< std::vector< float > > &samples, const std::vector< float > &outputs, const MorrisOptions &options={})
 Morris statistics from samples laid out as MorrisSample's (or SALib's) trajectories and one output per row: the same elementary effects and mu, mu*, sigma as SALib 1.6 morris.analyze (unscaled). The confidence interval is a bootstrap with this library's own generator, so it agrees with SALib's in distribution, not digit for digit.
 
MorrisResult pulsatrix::ComputeMorris (const std::function< Tensor(const Tensor &)> &predict, const GlobalSensitivityProblem &problem, int64_t target_index, const MorrisOptions &options={})
 Samples, runs the model and analyzes: MorrisSample, then AnalyzeMorris.
 
SobolResult pulsatrix::AnalyzeSobol (const std::vector< float > &outputs, int64_t num_features, const SobolOptions &options={})
 Sobol indices from outputs in SALib's layout without second order: N blocks of (num_features + 2) outputs, f(A), f(AB_1) ... f(AB_D), f(B). Outputs are standardized first, then the first order uses Saltelli et al. (2010)'s estimator and the total order Jansen's, exactly as SALib 1.6 does. The bootstrap uses this library's generator.
 
SobolResult pulsatrix::ComputeSobol (const std::function< Tensor(const Tensor &)> &predict, const GlobalSensitivityProblem &problem, int64_t target_index, const SobolOptions &options={})
 Samples two independent uniform matrices A and B over the problem's ranges, builds the Saltelli design (AB_j is A with column j from B), runs the model on every row and calls AnalyzeSobol.
 

Detailed Description

Global sensitivity analysis: Morris elementary effects and Sobol indices (CFS-4).