Taguchi
taguchi
Taguchi robust classical Design of Experiments (DoE) matrices.
This module provides the TaguchiDesign class, which selects and constructs Taguchi Orthogonal Arrays (OAs).
Taguchi methods are optimized for quality engineering and robust product design, specifically designed
to minimize performance variance under uncontrollable noise conditions using Signal-to-Noise (\(S/N\)) ratios.
| CLASS | DESCRIPTION |
|---|---|
TaguchiDesign |
Generates Taguchi orthogonal array designs and S/N ratio mapping specifications. |
TaguchiDesign
Bases: DesignMatrix
Generates Taguchi orthogonal array designs and S/N ratio mapping specifications.
Taguchi designs leverage specialized, highly balanced fractional factorials (Orthogonal Arrays, denoted as \(L_4, L_8, L_9, L_{12}, L_{16}, L_{18}, L_{27}\), etc.) to evaluate factor effects on both the mean and variability of responses. Rather than optimizing the mean alone, Taguchi methods prioritize "robustness" — making the system insensitive to uncontrollable "noise factors".
Mathematical Specifications for Signal-to-Noise (\(S/N\), denoted \(\eta\)) Ratios
Taguchi methods convert multiple experimental response replicates \(y_1, y_2, \dots, y_n\) at each run into an \(S/N\) ratio (\(\eta\) in decibels) depending on the optimization objective:
- Smaller-The-Better (e.g., latency, defects, material wear): $$ \eta = -10 \log_{10} \left( \frac{1}{n} \sum_{i=1}^{n} y_i^2 \right) $$
- Larger-The-Better (e.g., conversion rate, user engagement, revenue): $$ \eta = -10 \log_{10} \left( \frac{1}{n} \sum_{i=1}^{n} \frac{1}{y_i^2} \right) $$
- Nominal-The-Best (e.g., precise target dimensions, exact fluid viscosity): $$ \eta = 10 \log_{10} \left( \frac{\bar{y}^2}{s^2} \right) $$ where \(\bar{y}\) is the sample mean and \(s^2\) is the sample variance across the replicates.
Orthogonal Array Database Selection Algorithm
- The user requests a specific array (e.g., \(L_9\), which supports up to 4 factors with 3 levels each).
- The algorithm maps the requested physical factors to columns in the standard predefined \(L_9\) template:
| Run | Col 1 (Coded) | Col 2 (Coded) | Col 3 (Coded) | Col 4 (Coded) |
|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 |
| 2 | 1 | 2 | 2 | 2 |
| 3 | 1 | 3 | 3 | 3 |
| 4 | 2 | 1 | 2 | 3 |
| 5 | 2 | 2 | 3 | 1 |
| 6 | 2 | 3 | 1 | 2 |
| 7 | 3 | 1 | 3 | 2 |
| 8 | 3 | 2 | 1 | 3 |
| 9 | 3 | 3 | 2 | 1 |
These levels are mapped back to the physical factor levels provided in factors.
| ATTRIBUTE | DESCRIPTION |
|---|---|
array_name |
The name of the target Taguchi Orthogonal Array (e.g.,
TYPE:
|
Examples:
Example
>>> # Selecting an L9 array (supports up to 4 factors at 3 levels)
>>> factors = {
... "temperature": [100, 150, 200],
... "pressure": [1.0, 1.5, 2.0],
... "catalyst": [0.01, 0.05, 0.10]
... }
>>> design = TaguchiDesign(factors, array_name="L9")
>>> # Generated matrix will contain exactly 9 balanced runs.
| PARAMETER | DESCRIPTION |
|---|---|
factors
|
Mapping of factor labels to their lists of levels.
TYPE:
|
array_name
|
The name of the target orthogonal array, e.g.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
generate |
Generates the Taguchi Orthogonal Array design matrix. |
Source code in src\xpyrment\design\doe\taguchi.py
generate
Generates the Taguchi Orthogonal Array design matrix.
Looks up the standard template corresponding to array_name, binds the active
factors to template columns, and maps them to physical levels.
| RETURNS | DESCRIPTION |
|---|---|
DataFrame
|
pd.DataFrame: A pandas DataFrame containing the Taguchi design matrix. |