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.
Metadata
Release files for pyfitradeoff 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyfitradeoff-1.0.0.tar.gz | 10.6 kB | With provenance | Details for pyfitradeoff-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyfitradeoff-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pyfitradeoff-1.0.0-py3-none-any.whl |
Total release size: 21.5 kB
Release files / pyfitradeoff-1.0.0.tar.gz
| Download URL | pyfitradeoff-1.0.0.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b3d61d21af26d9faea4f9eb5f585203f825cb6cc715c6643bf8c3dea46a7bf8
|
|
BLAKE2b-256 checksum How to use checksums |
dcd0f8829635ae5a259f57b91adabcdbc6720de003b74e20307a984772bc75bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logRelease files / pyfitradeoff-1.0.0-py3-none-any.whl
| Download URL | pyfitradeoff-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
939d7f36183565f61504310b518108e29f2634dcfd588f897d0d2dad6cfa3829
|
|
BLAKE2b-256 checksum How to use checksums |
0f88b8bc106ebf223730c136b299c4df4fc3f082dece71786b18a32dc5de7a40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logSecurity for pyfitradeoff 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pyfitradeoff-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.