Maritime Science Life

Calculations with context

Entropy criterion weights

Derive weights from raw nonnegative column proportions without cost inversion. These describe dataset contrast, not objective operational priorities.

Decision laboratory

Shannon entropy criterion weights

Raw nonnegative column proportions, with explicit zero-column handling

How unevenly does each criterion distinguish the available options? This entropy variant turns each nonnegative column into a distribution across alternatives, measures its distance from a uniform distribution, then normalizes the resulting contrasts. It calculates criterion weights, not a ranking of vessels.

Edit the decision matrix

Use 2–8 alternatives and 2–6 criteria. Enter a unit for each criterion (use “1” for dimensionless data). Values are 0 or have absolute magnitude 10⁻¹² to 10¹²; this is a numerical software envelope, not an operating limit. Decimal point or decimal comma and scientific notation are accepted; grouping and unit suffixes are not.

This variant accepts only nonnegative data. Benefit/cost direction does not change the proportion calculation.

Criteria
Editable performance matrix
AlternativeCriterion 1Criterion 2Criterion 3

Results appear after calculation. The article below is available without JavaScript.

Calculations and explicit CSV downloads stay in this page. No network requests or persistent storage are used.

Method and assumptions

Uniformity and contrastUniform shares give E equal to 1 and d equal to 0. Shares concentrated in one option give E equal to 0 and d equal to 1. An all-zero column is not a distribution and is excluded.Uniform sharesConcentration in one optionAll-zero columnAA0BB0CC0DD0E = 1; d = 0E = 0; d = 1p, E undefinedExclusion policy: d = 0
Conceptual endpoint cases, not a plot of the vessel example. Larger d is not a measure of safety or desirability.

1. Declare the scale

Use nonnegative ratio-scale observations with a meaningful zero. Keep the same unit within a column. Benefit/cost labels are recorded for interpretation, but this variant neither reverses cost columns nor applies min–max scaling. A different preprocessing rule defines a different weighting method.

2. Form column proportions

Divide each observation by that column’s sum. The proportions add to one for every positive-sum column. A zero observation contributes no logarithmic term, using the limiting convention 0 ln 0 = 0.

3. Measure uniformity

Entropy E is highest at uniform proportions. The contrast d = 1 − E therefore vanishes for a positive constant column. Concentration in fewer alternatives produces more contrast; this says nothing by itself about desirability or risk.

4. Normalize contrasts

Divide each d by the total contrast across criteria. A zero-sum column has undefined proportions and entropy; our explicit exclusion convention assigns d = 0. If every contrast is zero, the weights remain undefined. The software does not silently create equal weights.

pᵢⱼ = xᵢⱼ / Σᵢ xᵢⱼ

Eⱼ = −Σᵢ pᵢⱼ ln(pᵢⱼ) / ln(m)

dⱼ = 1 − Eⱼ; wⱼ = dⱼ / Σⱼ dⱼ

Symbols and units
SymbolDefinition
i, mAlternative index and count; 2 ≤ m ≤ 8
j, nCriterion index and count; 2 ≤ n ≤ 6
xᵢⱼPerformance of option i on criterion j, in its declared column unit
wⱼDimensionless nonnegative criterion weight; sum is 1 when defined
pᵢⱼDimensionless share of the positive column sum; undefined for an all-zero column
Eⱼ, dⱼNormalized entropy and contrast, both dimensionless
lnNatural logarithm; division by ln(m) removes the log-base choice

Worked maritime example

These four service-vessel options and all quantities are original, synthetic teaching data. They are not measured vessel performance, a procurement recommendation or safety approval.

Objective: Compare synthetic port service vessel options.

Data-driven weights describe contrast within the chosen dataset. They are not universally objective priorities, operational importance, probabilities or evidence of correctness. Criteria, units, origins and alternatives remain modeling choices.

Input matrix and metadata
CriterionUnitPreference direction
Daily energykWh/dayCost: minimize
Duty capacityjobs/dayBenefit: maximize
Maintenance timeh/monthCost: minimize
Editable performance matrix
AlternativeDaily energyDuty capacityMaintenance time
Vessel A100612
Vessel B120910
Vessel C80518
Vessel D11088
Column proportions p
AlternativeDaily energyDuty capacityMaintenance time
Vessel A0.243902440.214285710.25
Vessel B0.292682930.321428570.20833333
Vessel C0.195121950.178571430.375
Vessel D0.268292680.285714290.16666667
Contributions −p ln(p)
AlternativeDaily energyDuty capacityMaintenance time
Vessel A0.344143160.330095370.34657359
Vessel B0.359609390.364814980.32679498
Vessel C0.318854740.307636890.36781097
Vessel D0.352986460.357932280.29862658
Calculation result
CriterionColumn sumEntropy EDivergence dExcludedWeight w
Daily energy4100.992281140.0077188606No0.1289173
Duty capacity280.981378520.018621476No0.31100839
Maintenance time480.966465820.033534177No0.56007431

Weights defined: Yes. Total information = 0.059874514.

Substitute the values

p₁₁ = 100 / (100 + 120 + 80 + 110) = 0.24390244

E₁ = [0.34414316 + 0.35960939 + 0.31885474 + 0.35298646] / ln(4) = 0.99228114

d₁ = 1 − E₁ = 0.0077188606

w₁ = 0.0077188606 / 0.059874514 = 0.1289173

Sensitivity checks

Remove each alternative in turn, rebuild preprocessing and recompute weights. A change shows dependence on the option set. These are descriptive checks, not uncertainty intervals. With only two alternatives the leave-one-out check is omitted because the method requires at least two.

Sensitivity checks
Alternative left outWeights definedw: Daily energyw: Duty capacityw: Maintenance time
Vessel AYes0.134320820.271852890.59382629
Vessel BYes0.105927650.23789850.65617385
Vessel CYes0.0926228980.456667650.45070945
Vessel DYes0.175563620.412218190.41221819

Tables display 8 significant digits. Calculations use unrounded binary64 values; CSV preserves round-trip numeric precision. “Undefined” is never replaced by an invented score.

Interpretation and limits

  • A positive multiplicative unit conversion leaves proportions unchanged; adding an offset generally changes them. Celsius-like arbitrary origins are unsuitable for this raw ratio-scale variant. Negative inputs are rejected rather than silently shifted.
  • Duplicating a criterion duplicates its influence in the final normalization. Entropy does not model cross-criterion correlation. Outliers, measurement noise and which alternatives are included can change the weights.
  • For numerical stability the engine evaluates the mathematically equivalent KL divergence from uniform, d = Σ[p ln(mp) − p + 1/m]/ln(m), using a small-difference series and centered original-value residuals near uniformity. Numerically resolved differences can still be far smaller than measurement precision; normalized weights then magnify negligible data contrasts. Entropy is independently accumulated with stable log1p probability logs, preserving tiny positive entropy near complete concentration. A displayed E rounded to 1 can coexist with a small positive unrounded d.
  • An excluded safety-critical criterion is not unimportant in practice. Apply hard constraints and justified priorities separately; never use these weights alone to approve a vessel or operation.
Check your understanding: multiplying the entire energy column by 1,000 changes its unit from kWh to Wh. Do the entropy weights change?

No. The common positive factor cancels in the column proportions. Adding 1,000 to every energy entry would generally change them.

Primary methodology sources

Roszkowska & Wachowicz (2024), Entropy 26, 365, §2.1, equations (3), (4), (7).

Shannon (1948), A Mathematical Theory of Communication. Information-theory foundation; not presented as the source of the later criterion-weighting algorithm.

The declared zero, tie and numerical edge-case policies are implementation choices of this tool. entropy v1.0.0.

Related context

The method explanation and worked example are on this page. The articles below provide additional context.

All calculators