Skip to main content

PROMETHEE I/II/Gamma/Sort MCDA methods

Project description

promethee

Python implementation of the PROMETHEE family of MCDA (Multi-Criteria Decision Analysis) methods, maintained by the SMG research group at ULB. Built on mcda-core.

Implements PROMETHEE I, II, III, Gamma, GAIA, FlowSort, and P2Clust, with all six standard preference functions.

About SMG

The Decision Support Systems (SMG) group is a research lab at Université libre de Bruxelles (ULB) specialising in multi-criteria decision analysis. The group develops theoretical foundations and practical tools for MCDA, with a focus on the PROMETHEE methods.

If you are using this library for research, feel free to reach out at gilles.dejaegere@ulb.be — we are happy to help you apply the methods and to start scientific collaborations.

Installation

pip install mcda-promethee

Python ≥ 3.9.

Quick start

For a hands-on walkthrough, see the demo notebook.

import numpy as np
from promethee import PrometheeII, PerformanceTable, ParametersPromethee, build_preference_functions

# 4 countries evaluated on 2 indicators
table = PerformanceTable(
    values=np.array([
        [77.2, 0.887],
        [76.5, 0.832],
        [80.1, 0.919],
        [73.4, 0.798],
    ]),
    alternatives=["Country A", "Country B", "Country C", "Country D"],
    criteria=["life_expectancy", "education_index"],
    directions=[1, 1],  # maximise both
)

weights = np.array([0.5, 0.5])
prefs = build_preference_functions([
    ("v_shape_with_indifference", {"p": 5.0, "q": 1.0}),
    ("v_shape_with_indifference", {"p": 0.08, "q": 0.02}),
])

params = ParametersPromethee(weights=weights, preference_functions=prefs)
model = PrometheeII(performance_table=table, parameters=params)
model.fit()

print(model.net_flows)   # φ score per alternative
print(model.ranking)     # indices sorted best → worst

Parameters can also be loaded from a JSON file (see tests/data/epi_parameters.json for an example):

import json
from promethee import ParametersPromethee

with open("parameters.json") as f:
    params = ParametersPromethee.from_dict(json.load(f))

Preference functions

All six standard PROMETHEE preference functions are available:

kind string parameters description
"usual" Full preference for any positive difference
"u_shape" q Step at indifference threshold
"v_shape" p Linear up to preference threshold
"v_shape_with_indifference" q, p Linear between indifference and preference thresholds
"level" q, p Half preference in the intermediate zone
"gaussian" s Smooth Gaussian curve (inflection point s)
from promethee import build_preference_functions

prefs = build_preference_functions([
    ("usual", {}),
    ("v_shape_with_indifference", {"q": 2.0, "p": 8.0}),
    ("gaussian", {"s": 3.0}),
])

API reference

PrometheeII

Computes a complete ranking via net flows φ.

property description
net_flows φ score per alternative, shape (n,)
pairwise_preferences aggregated preference matrix π, shape (n, n)
monocriterion_net_flows mono-criterion net flows φ_k, shape (n, m)
ranking indices sorted best → worst
result() returns net_flows

All properties trigger fit() automatically if not already called.

ParametersPromethee

field type description
weights ndarray (m,) criterion weights (need not sum to 1)
preference_functions Sequence[PreferenceFunction] one per criterion

Constructors:

  • ParametersPromethee(weights, preference_functions) — direct
  • ParametersPromethee.from_dict(data) — from a parameter dictionary
  • ParametersPromethee.from_weights_and_criteria(weights, criteria_types, p, q) — shorthand using V-shape with indifference

Quality indicators

Four indicators measure how well the net flows capture the pairwise preference structure:

from promethee import r_squared, additive_transitivity_index, pairwise_agreement_ratio, spectral_rank2_energy_ratio

pi  = model.pairwise_preferences
phi = model.net_flows

print(r_squared(pi, phi))                   # how well φ explains π (0–1, higher is better)
print(additive_transitivity_index(pi))      # transitivity violations (0 = perfect)
print(pairwise_agreement_ratio(pi, phi))    # pairs where pairwise order agrees with φ
print(spectral_rank2_energy_ratio(pi))      # spectral consistency of π (0–1, higher is better)

Other algorithms

class description
PrometheeI Partial ranking via positive/negative flows
PrometheeIII Interval-based preorder: each alternative gets [x(a), y(a)] centred on its net flow; overlapping intervals → indifference
PrometheeGamma Extends II with γ-based incomparability detection (Dejaegere & De Smet, 2023)
PrometheeGAIA SVD biplot of monocriterion net flows — visualises alternatives, criteria, and the decision stick δ
FlowSort Assigns each alternative to an ordered category using limiting reference profiles (pessimistic rule)
P2Clust Clusters alternatives by splitting the sorted net-flow sequence at the k−1 largest gaps

Demos of PrometheeIII, PrometheeGAIA, FlowSort, and P2Clust are included in the demo notebook.

All public classes and parameter types are importable directly from promethee.

PrometheeIIIParametersPrometheeIII

Extends ParametersPromethee with one optional field:

field type default description
alpha float 1.0 interval half-width multiplier; larger → more indifferences

Key properties: net_flows, intervals (shape (n, 2)), relation (binary (n, n) outranking matrix).

PrometheeGAIAParametersPromethee

Key properties: alternatives (2D coordinates, shape (n, 2)), criteria (shape (m, 2)), delta (decision stick, shape (2,)), quality (fraction of variance explained by the plane).

FlowSortParametersFlowSort

Extends ParametersPromethee with:

field type description
reference_profiles ndarray (p, m) limiting profiles ordered best → worst
profile_names Sequence[str], optional labels for the p profiles
category_names Sequence[str], optional labels for the p+1 categories

Key properties: assignments (category index per alternative), net_flows.

P2ClustParametersP2Clust

Extends ParametersPromethee with:

field type description
k int number of clusters

Key properties: assignments (cluster index 0 = best), net_flows, ranking.

Ecosystem

Part of the modular MCDA Python ecosystem. See mcda-core for the full picture.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcda_promethee-0.4.1.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcda_promethee-0.4.1-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file mcda_promethee-0.4.1.tar.gz.

File metadata

  • Download URL: mcda_promethee-0.4.1.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for mcda_promethee-0.4.1.tar.gz
Algorithm Hash digest
SHA256 205e505f2f772251d2778e9d00f4e61dbf27544342d55698da7489700e45a5c4
MD5 febc42a3c325c8489d81fd428391c2dd
BLAKE2b-256 58eb7a3422fd05e5dd346bf816c5380d344fb33ae7ff73a680f6eeb63d984127

See more details on using hashes here.

File details

Details for the file mcda_promethee-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: mcda_promethee-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for mcda_promethee-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23f1fda2ad4b322369ba3c27026fd37ce55a986d4e753918ccf23757132fb454
MD5 2a26d962932abef0fe00c2e3834470e1
BLAKE2b-256 9fca62b271e54ef080045b18c2e111075f370acd6c04b27803c66c464761deb9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page