Skip to main content

An implementation of classic and alternative versions of FITradeoff Multiple-criteria Decision Analysis (MCDA) method.

Project description

Pyfitradeoff

Pyfitradeoff is a Python library that implements the Flexible and Interactive Tradeoff (FITradeoff) multi-criteria decision analysis (MCDA) method. This implementation includes the original FITradeoff heuristic and two optimized variants, LR (Logistic Regression) FITradeoff and FR (Full Recall) FITradeoff, designed to minimize the number of questions required from a Decision Maker (DM) to reach a final recommendation.

The library is based on the research presented in: Efficient preference elicitation in FITradeoff: a sampling and machine learning-based query selection approach.

Key Features

  • Standard FITradeoff: Implementation of the original method using the traditional distance heuristic.
  • LR FITradeoff: An optimized variant using MCMC sampling and a Logistic Regression classifier to select questions that maximize information gain in the weights vector space.
  • FR FITradeoff: An optimized variant utilizing an ad-hoc classifier designed to maximize query recall and the separation of potentially optimal alternatives.
  • Simulation Tools: A script to run repeatable randomized experiments and compare the proposed methods.

Installation

pip install pyfitradeoff

Usage

The solver provides a consistent interface for all variants. If a weights vector is provided during initialization, the step() method automatically simulates the decision-maker response. The solver raises a BestAlternativeFound exception when the preference elicitation process identifies a unique optimal alternative.

import numpy as np
from pyfitradeoff import FITradeoff, OptFITradeoff, BestAlternativeFound

n_alternatives = 10
n_criteria = 5

consequences = np.random.rand(n_alternatives, n_criteria)
weights = np.array([0.35, 0.25, 0.20, 0.15, 0.05])

solver = OptFITradeoff(consequences=consequences, weights=weights, method="FR")
try:
    while True:
        solver.step()
except BestAlternativeFound as e:
    print(e)

Experiment

To replicate the experiments described in the associated paper, the library includes a script:

from pyfitradeoff.experiments import randomized_experiment

randomized_experiment.main()

Citation

If you use this library in your research, please cite:

Zhao, Q., Balugani, E., Lolli, F., & Gamberini, R. (2026). 
Efficient preference elicitation in FITradeoff: a sampling and machine
learning-based query selection approach.

License

This project is licensed under the MIT 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

pyfitradeoff-1.0.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

pyfitradeoff-1.0.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pyfitradeoff-1.0.0.tar.gz.

File metadata

  • Download URL: pyfitradeoff-1.0.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyfitradeoff-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6b3d61d21af26d9faea4f9eb5f585203f825cb6cc715c6643bf8c3dea46a7bf8
MD5 1cdd011101a333aa6e5f70c27500145d
BLAKE2b-256 dcd0f8829635ae5a259f57b91adabcdbc6720de003b74e20307a984772bc75bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfitradeoff-1.0.0.tar.gz:

Publisher: publish.yml on elbal/pyfitradeoff

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyfitradeoff-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyfitradeoff-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyfitradeoff-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 939d7f36183565f61504310b518108e29f2634dcfd588f897d0d2dad6cfa3829
MD5 e19f60efc61cccb5c17394b19b698880
BLAKE2b-256 0f88b8bc106ebf223730c136b299c4df4fc3f082dece71786b18a32dc5de7a40

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfitradeoff-1.0.0-py3-none-any.whl:

Publisher: publish.yml on elbal/pyfitradeoff

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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