Entropy Weight
Overview
The Entropy Weight Method uses Shannon entropy to compute objective weights automatically from data variance. Objectives that vary more across trials carry more information and receive higher weights. No manual input is required.
For each objective, Tunny Dashboard provides:
| Output | Description |
|---|---|
| Weight | Each objective's weight (sum = 1) |
| Entropy | Each objective's information entropy e_j ∈ [0, 1] |
| Diversity | Each objective's diversity d_j = 1 − e_j ∈ [0, 1] |
| Normalized matrix | Proportionally normalized matrix (rows = trials, cols = objs) |
Algorithm
Step 1: Handle Negative Values
Entropy requires non-negative values. For any objective column j that contains negative values, apply Min-Max normalization:
Columns with no negative values keep their original values.
Zero-division guard (constant column): if max = min (range = 0), set x'_ij = 1.0, not 0. Setting it to 0 would make every row's proportional weight p_ij = 0 in Step 2, which yields e_j = 0 (diversity d_j = 1) in Step 3 — an information-free constant column would then win the largest weight, the opposite of the intended behavior. Setting it to 1.0 instead makes p_ij = 1/m (uniform) after Step 2, giving e_j = 1.0, d_j = 0, and w_j = 0, consistent with how a positive constant column (never Min-Max normalized) is already handled.
Step 2: Proportional Normalization
Normalize each column so its sum = 1, giving a probability-like matrix P:
Zero-division guard: if the column sum is 0, set p_ij = 0.
Step 3: Shannon Entropy
The factor 1/ln(m) normalizes entropy to [0, 1]. Terms where p_ij = 0 contribute 0 (0·ln(0) = 0). When m = 1, set e_j = 0.
Step 4: Diversity
High entropy → low diversity → low weight (objective is uninformative).
Step 5: Weight Normalization
Uniform fallback: if all d_k = 0 (all objectives are constant), assign equal weights w_j = 1/n.
Behavior Details
Handling of NaN Trials
Trials where any objective value is NaN are excluded from the set of valid trials. If every trial is NaN, an error is returned instead of a result.
Negative-Value Handling
Negative-value checking and correction are applied independently, one objective column at a time. If only some columns contain negative values, only those columns go through Min-Max normalization; the others keep their original values.
This preserves the absolute scale information of the positive objectives (which trials differ, and by how much) while still correcting the negative columns.
Integration with MCDM Ranking
Selecting the Entropy weight mode in the MCDM Ranking widget computes entropy weights in the background and uses the result as the weights for TOPSIS / VIKOR. The UI stays responsive while this computation runs.
Numerical Example
3 trials × 2 objectives (both non-negative):
| Trial | Obj 1 | Obj 2 |
|---|---|---|
| 0 | 5 | 1 |
| 1 | 5 | 2 |
| 2 | 5 | 3 |
Obj 1 is constant → e_1 = 1.0, d_1 = 0, w_1 = 0.
Obj 2 varies → e_2 ≈ 0.982, d_2 ≈ 0.018, w_2 = 1.0.
The constant objective contributes nothing; the varying one carries all the weight.
Complexity
O(m × n) — under 100 ms for 50,000 trials × 4 objectives.
Strengths and Limitations
Strengths
- Fully data-driven — no manual weight input needed
- Eliminates analyst bias
- Lightweight: scales linearly with data size
Limitations
- Assumes "more variance = more important," which may not match domain knowledge
- Near-constant objectives may have their weight dominated by small noise
- Cannot encode domain expertise about objective priority
When to Use
No domain knowledge about relative importance? → Entropy Weight (auto)
Want data-driven weights for TOPSIS / VIKOR? → Entropy Weight + any method
Have strong preferences about objective priority? → Manual weight sliders
Comparing both approaches? → toggle Entropy ↔ Manual in the UIReferences
- Shannon, C. E. (1948). A Mathematical Theory of Communication. Bell System Technical Journal, 27, 379–423. https://doi.org/10.1002/j.1538-7305.1948.tb01338.x
- Wang, T.-C., & Lee, H.-D. (2009). Developing a fuzzy TOPSIS approach based on subjective weights and objective weights. Expert Systems with Applications, 36(5), 8980–8985. https://doi.org/10.1016/j.eswa.2008.11.035