weighted_sum
mcda.weighted_sum(normalized, weights)
Simple additive weighting (SAW): per-tool dot product of scores and weights.
On a complete matrix the computation is delegated to pymcdm.methods.WSM with an identity normalization, so every aggregation in beam runs on the same engine. pymcdm runs directly on beam’s already normalized matrix, with all criteria typed as profit (+1) because the matrix is oriented higher is better.
SAW is the one aggregation with a well-defined form under missing cells that does not impute. When normalized has missing cells, each tool is scored on the metrics it was actually measured on, with the weights renormalized over that tool’s observed support:
composite(i) = sum_{j observed for i} w_j * x_ij / sum_{j observed for i} w_j
A complete row reduces to the ordinary weighted sum, so this matches the pymcdm path exactly when no cell is missing and the weights sum to one. The composites then rest on different metric supports across tools, which the caller must surface; beam.mcda.run does so with a warning under missing="available". A row with no observed metric cannot be scored and raises, since there is nothing to average. The distance and pairwise methods (TOPSIS, VIKOR, PROMETHEE II, COMET) have no such form and refuse a matrix with missing cells outright.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
normalized |
np.ndarray | required | |
weights |
np.ndarray | required |
Returns
| Type | Description |
|---|---|
| 1D array of length n_tools, the composite score per tool. |
Raises
| Type | Description |
|---|---|
| IncompleteMatrixError | If a tool row has no observed metric, so its composite is undefined. |