Javatpoint Logo
Javatpoint Logo

Sensitivity Analysis to Optimize Process Quality in Python

In this tutorial, we will discuss the concept of sensitivity analysis. We will explore various methods for conducting sensitivity analysis and optimizing process quality in Python. Let us first briefly understand the concept of sensitivity analysis. Sensitivity analysis is a powerful technique used to understand how changes in input parameters affect the output of a model or a process. Under a given set of assumptions, sensitivity analysis evaluates how alternative values of an independent variable influence a certain dependent variable.

Understanding Sensitivity Analysis

It serves the following goals:

  • Identify Critical Parameters: Determine which input parameters have the most significant impact on the output.
  • Assess model reliability: Understand how input parameter variations affect predictions' reliability.
  • Optimize Processes: Use sensitivity analysis to improve processes by identifying which parameters to control or adjust. This can lead to cost savings and enhanced performance.

Several Methods to Perform Sensitivity Analysis

Sensitivity analysis can be approached using various methods. Each is suited to specific scenarios. In this tutorial, we will cover three common methods:

  • One-At-A-Time (OAT)
  • Morris method
  • Sobol indices.

One-At-A-Time (OAT) Sensitivity Analysis

The One-At-A-Time (OAT) method is one of Python's simplest forms of sensitivity analysis. This OAT is easy to implement but may need to include interactions between variables. In this method, we vary one input parameter at a time while keeping others constant.

Let's illustrate OAT sensitivity analysis with an example using Python:

Code:

Output:

OAT Sensitivity Analysis - Varying x:
 x = 1.0, Output = 6.0
 x = 1.5, Output = 7.25
 x = 2.0, Output = 9.0
 x = 2.5, Output = 11.25
 x = 3.0, Output = 14.0
 OAT Sensitivity Analysis - Varying y:
 y = 2.0, Output = 7.0
 y = 2.5, Output = 8.0
 y = 3.0, Output = 9.0
 y = 3.5, Output = 10.0
 y = 4.0, Output = 11.0
 OAT Sensitivity Analysis - Varying z:
 z = 0.0, Output = 10.0
 z = 0.5, Output = 9.5
 z = 1.0, Output = 9.0
 z = 1.5, Output = 8.5
 z = 2.0, Output = 8.0

Morris Method Sensitivity Analysis

The Morris method is a global sensitivity analysis technique that evaluates the effect of input parameters over a defined range. It is particularly useful for models with a large number of parameters.

Let's perform Morris method sensitivity analysis using the `SALib` library in Python:

Code:

Output:

Sensitivity Indices (mu):
x: 0.6666666666666666
y: 0.6666666666666666
z: 0.0

The Morris method provides sensitivity indices (`mu`) for each parameter, indicating their influence on the model output. Higher values of `mu` imply greater sensitivity.

Sobol Indices Sensitivity Analysis

The Sobol indices are another global sensitivity analysis technique that evaluates the contribution of individual parameters and their interactions to the output variance.

Let's perform Sobol indices sensitivity analysis using the `SALib` library in Python:

Code:

Output:

First-Order Sobol Indices:
x: 0.6666666666666665
y: 0.6666666666666665
z: -0.0

Total Sobol Indices:
x: 0.6666666666666665
y: 0.6666666666666665
z: 0.0

We calculate first-order (`S1`) and total (`ST`) Sobol indices for each parameter in this example. These indices quantify the influence of individual parameters and their interactions on the output variance.

Conclusion

In summary, sensitivity analysis is a crucial step in understanding how input parameters affect the output of a model or process. Using methods like OAT, the Morris method, or Sobol indices, you can gain valuable insights into parameter sensitivity and make informed decisions for process optimization and model reliability.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA