merec_weights

mcda.merec_weights(normalized)

MEREC weights for a [0, 1] normalized tool by metric matrix.

MEREC (Method based on the Removal Effects of Criteria) weights each metric by how much the overall performance scores change when that metric is dropped. A metric whose removal barely moves the scores carries little information and gets a small weight. A metric whose removal shifts the scores a lot gets a large weight.

Algorithm, treating every metric as higher is better:

  1. Linear cost normalization of each column: divide the column minimum by each entry, which maps the best tool toward a small value and keeps the multiplicative structure of the scores.
  2. Aggregate each tool with a logarithmic measure S[i] = ln(1 + (1 / n_metrics) * sum_j |ln nmatrix[i, j]|).
  3. For each metric j, recompute the same aggregate with column j removed, giving S_without_j[i].
  4. The removal effect of metric j is the total absolute change it causes, E[j] = sum_i |S_without_j[i] - S[i]|.
  5. Return weights w[j] = E[j] / sum_k E[k].

If every metric has the same removal effect of zero, the function falls back to equal weights.

Parameters

Name Type Description Default
normalized np.ndarray Shape (n_tools, n_metrics), values in (0, 1] (strictly positive). required

Returns

Type Description
np.ndarray Shape (n_metrics,), non-negative weights summing to 1.

Raises

Type Description
ValueError If any value is zero. MEREC takes the logarithm of the normalized scores, which is undefined at zero, so the input must be strictly positive. Normalizations that can emit a hard zero, such as plain min-max, should be replaced by one bounded away from zero, for example the logistic z-score strategy, before calling MEREC.

References

Keshavarz-Ghorabaee, M., Amiri, M., Zavadskas, E. K., Turskis, Z., Antucheviciene, J. Determination of Objective Weights Using a New Method Based on the Removal Effects of Criteria (MEREC). Symmetry 13 (2021).