ProMCDA


NameProMCDA JSON
Version 1.0.8 PyPI version JSON
download
home_pagehttps://github.com/wetransform-os/ProMCDA
SummaryA probabilistic Multi Criteria Decision Analysis
upload_time2023-11-28 10:47:21
maintainer
docs_urlNone
authorFlaminia Catalli - wetransform GmbH, Matteo Spada - Zurich University of Applied Sciences
requires_python>=3.9
licenseEPL v 2.0
keywords mcda robustness analysis monte carlo sampling probabilistic approach
VCS
bugtrack_url
requirements numpy pandas plotly pytest scikit-learn scipy Pillow kaleido
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="left">
<img src="https://raw.githubusercontent.com/wetransform-os/ProMCDA/release/logo/ProMCDA_logo.png">
<div>

# Probabilistic Multi Criteria Decision Analysis

<!-- [![status](https://joss.theoj.org/papers/4214c6e588774490458e34630e8052c1/status.svg)](https://joss.theoj.org/papers/4214c6e588774490458e34630e8052c1) -->
<!-- [![PyPi version](https://img.shields.io/pypi/v/promcda?color=blue)](https://pypi.org/project/promcda) -->
[![pytest](https://github.com/wetransform-os/ProMCDA/actions/workflows/python-app-tests.yml/badge.svg)](https://github.com/wetransform-os/ProMCDA/actions/workflows/python-app-tests.yml)
![License](https://img.shields.io/badge/license-EPL%202.0-blue)

A tool to estimate scores of alternatives and their uncertainties based on a Multi Criteria Decision Analysis (MCDA) approach.

### MCDA quick overview and applications
A MCDA approach is a systematic framework for making decisions in situations where multiple criteria or objectives need to be 
considered. It can be applied in various domains and contexts. Here are some possible usages of an MCDA approach:

- **Environmental impact assessment**: assess the environmental consequences of various projects or policies by considering 
  multiple environmental criteria.
- **Project selection**: choose the most suitable project from a set of alternatives by considering multiple criteria such 
  as cost, risk, and strategic alignment.
- **Healthcare decision-making**: decide on the allocation of healthcare resources, such as funding for medical treatments 
  or the purchase of medical equipment, while considering criteria like cost-effectiveness, patient outcomes, 
  and ethical considerations. It applies to other decision-making problems too.
- **Investment portfolio optimization**: construct an investment portfolio that balances criteria like risk, return, 
  and diversification.
- **Personnel recruitment**: evaluate job candidates based on criteria like qualifications, experience, and cultural fit.
- **Location analysis**: choose the optimal location for a new facility or business by considering factors like cost, 
  accessibility, and market potential.
- **Public policy evaluation**: assess the impact of proposed policies on various criteria, such as economic growth, 
  social welfare, and environmental sustainability.
- **Product development**: prioritize features or attributes of a new product by considering criteria like cost, market demand, 
  and technical feasibility.
- **Disaster risk management**: identify high-risk areas and prioritize disaster preparedness and mitigation measures based 
  on criteria like vulnerability, exposure, and potential impact.
- **Energy planning**: make decisions about energy resource allocation and investments in renewable energy sources, 
  taking into account criteria like cost, environmental impact, and reliability.
- **Transportation planning**: optimize transportation routes, modes, and infrastructure investments while considering 
  criteria like cost, time efficiency, and environmental impact.
- **Water resource management**: optimize water allocation for various uses, including agriculture, industry, 
  and municipal supply, while considering criteria like sustainability and equity.
- **Urban planning**: decide on urban development projects and land-use planning based on criteria such as social equity, 
  environmental impact, and economic development.

These are just a few examples of how MCDA can be applied across a wide range of fields to support decision-making processes 
that involve multiple, often conflicting, criteria. The specific application of MCDA will depend on the context 
and the goals of the decision-maker.

Before using ```ProMCDA```, we suggest you first to get familiar with the main steps and concepts of an MCDA method: 
the normalization of the criteria values; their polarities and weights; and the aggregation of information into a composite indicator. 
In MCDA context an *alternative* is one possible course of action available; an *indicator*, or *criterion*, is a parameter 
that describes the alternatives. The variability of the MCDA scores are caused by:

- the sensitivity of the algorithm to the different pairs of normalization/aggregation functions (--> sensitivity analysis);
- the randomness that can be associated to the weights (--> robustness analysis);
- the uncertainty associated with the indicators (--> robustness analysis).

Here we define:
- the **sensitivity analysis** as the one aimed at capturing the output score stability to the different initial modes;
- the **robustness analysis** as the one aimed at capturing the effect of any changes in the inputs (their uncertainties) on the output scores.

The tool can be also used as a simple (i.e. deterministic) MCDA ranking tool with no robustness/sensitivity analysis (see below for instructions).

### Input information needed in the configuration file
A configuration file is needed to run```ProMCDA```.
The configuration file collects all the input information to run ```ProMCDA``` in your specific study case.
You find a configuration.json file as an example in this directory: please modify it for your needs. In the following, 
the entries of the configuration file are described.

***Path to the input matrix***, a table where rows represent the alternatives and columns represent the indicators.
Be sure that the column containing the names of the alternatives is set as the index column, e.g. by:
```bash
input_matrix = input_matrix.set_index('Alternatives').
```
Be sure that there are no duplicates among the rows. If the values of one or more indicators are all the same, 
the indicators are dropped from the input matrix because they contain no information.
Examples of input matrix:

- *input matrix without uncertainties* for the indicators (see an example here: `tests/resources/input_matrix_without_uncert.csv`);
- *input matrix with uncertainties* for the indicators (see an example here: `tests/resources/input_matrix_with_uncert.csv`).

The example input matrix with uncertainties is designed for an example where the PDFs describing the indicators are respectively: 
uniform; exact; normal (or lognormal); exact; and normal (or lognormal). Please modify it for your specific needs.

If the input matrix without uncertainties has any values of any indicators that are negative, those values are rescaled
between [0,1]. This is needed because some normalization functions (as for example *target*) cannot handle negative values 
properly.

The input matrix with uncertainties has the following characteristics:

- if an indicator is described by an *exact* probability density function (PDF), one needs only a column with its values;
- if an indicator is described by a *uniform* PDF, one needs two columns with the lowest and highest values (in this order);
- if an indicator is described by a *normal* PDF, one needs two columns with the mean and standard deviation values (in this order);
- if an indicator is described by a *lognormal* PDF, one needs two columns with the log(mean) and log(standard deviation) values (in this order);
- if an indicator is described by a *Poisson* PDF, one needs only one colum with the rate.

If any mean value of any indicator is equal or smaller of its standard deviation - in case of a normal or lognormal PDF - 
```ProMCDA``` breaks to ask you if you need to investigate your data further before applying MCDA. In fact, your data shows
a high variability regarding some indicators. If you want to continue anyway, negative sampled data will be rescaled 
into [0,1], as in the case without uncertainty.


***List of polarities*** for each indicator, "+" (the higher the value of the indicator the better for the evaluation) 
or "-" (the lower the value of the indicator the better).

The configuration file can trigger a run with or without ***sensitivity analysis***; this is set in the `sensitivity_on` parameter (*yes* or *no*); 
if *no* is selected, then the pair normalization/aggregation should be given in `normalization` and `aggregation`. If *yes*
is selected, then the normalization/aggregation pair is disregarded.

Similarly, a run with or without uncertainty on the indicators or on the weights (i.e. with ***robustness analysis***) 
can be triggered by setting the `robustness_on` parameter to *yes* or *no*. If `robustness_on` is set to *yes*, then 
the uncertainties might be on the indicators (`on_indicators`) or on the weights (`on_single_weights` or `on_all_weights`). 
In the first case (`on_single_weights=yes`) one weight at time is randomly sampled from a uniform distribution; 
in the second case (`on_all_weights=yes`) all weights are simultaneously sampled from a normal distribution. 
If there is no uncertainty associated to the weights, then the user should provide a ***list of weights*** for the indicators. 
The sum of the weights should always be equal to 1 or the values will be normalised internally. 
Depending on the different options, information not needed are disregard. Sensitivity and robustness analysis can be run
together. If robustness analysis is selected, it can run either on the weights or on the indicators, but not on both simultaneously.

If robustness analysis is selected, a last block of information is needed:
the ***Number of Monte Carlo runs***, "N" (default is 0, then no robustness is considered; N should be a sufficient big number, 
e.g., larger or equal than 1000). The ***number of cores*** used for the parallelization; and a 
***List of marginal distributions*** for each indicator; the available distributions are: 
  - exact, **"exact"**,
  - uniform distribution, **"uniform"**
  - normal distribution, **"norm"**
  - lognormal distribution, **"lnorm"**
  - Poisson distribution, **"poisson"**

### Output

The user gives the ***path to output file*** (e.g. `path/output_file.csv`). In the output file the scores (normalised or rough) 
and the ranks relative to the alternatives can be found in the form of CSV tables. If the weights are iteratively sampled, 
multiple tables are saved in a PICKLE file as an object ```dictionary```. Plots of the scores are saved in PNG images. The configuration.json file
is saved in the output directory too; the information stored in the configuration settings are useful in case 
multiple tests are stored and need to be reviewed.

All file names of the output objects are followed by a time stamp that group them with the specific test setting.

To retrieve a PICKLE file in Python one can:

```pythongroup them 
import pickle

# Replace 'your_file.pickle' with the path to your PICKLE file
file_path = 'your_file.pickle'

# Load the PICKLE file
with open(file_path, 'rb') as file:
    data = pickle.load(file)

# Now, 'data' contains the object or data stored in the PICKLE file
```
Note that in case of a robustness analysis, the error bars in the plots are only shown for non-normalized scores. This is
because when one calculates the standard deviation after rescaling, the denominator used in the standard deviation formula 
becomes smaller. This results in a higher relative standard deviation compared to the mean that is solely an artificial 
effect.
  

### Requirements
On Windows:
```bash
conda create --name <choose-a-name-like-Promcda> python=3.6
activate.bat <choose-a-name-like-Promcda>
pip install -r requirements.txt
```
On Mac and Linux:
```bash
conda create --name <choose-a-name-like-Promcda> python=3.6
source activate <choose-a-name-like-Promcda>
pip install -r requirements.txt
```

### Running the code (from root dir)
On Windows:
```bash
activate.bat <your-env>
python3 -m mcda.mcda_run -c configuration.json
```
On Mac and Linux:
```bash
source activate <your-env>
python3 -m mcda.mcda_run -c configuration.json
```
where an example of configuration file can be found in `./configuration.json`.

### Running the tests
```bash
python3 -m pytest -s tests/unit_tests -vv
```

### Code overview: a high-level summary
If no robustness analysis is selected, then:
- the indicator values are normalized by mean of all the possible normalization methods (or by the selected one);
- the normalized indicators are aggregated by mean of all the possible aggregation methods (or by the selected one), 
  by considering their assigned weights;
- the resulting scores of all the combinations normalization/aggregation (or the selected ones only) are provided in form 
  of a csv table and plots in png format in the output directory.

If the weights are randomly sampled (robustness analysis of the weights), then:
- all weights or one weight at time are randomly sampled from a uniform distribution [0,1];
- the weights are normalized so that their sum is always equal to 1;
- if all weights are sampled together, MCDA calculations receive N-inputs (N being the number of `monte_carlo_runs`; 
  if the weights are sampled one at time, MCDA will receive (*n-inputs x num_weights*) inputs;
- iterations 1,2,3 of the first condition follow;
- the results of all the combinations normalization/aggregation (or the one selected) are provided in the form of mean and standard deviation over all the runs 
  (if the weights are iteratively sampled, this applies for *num_indicators-times*).

If the robustness analysis regards the indicators, then:
- for each indicator, the parameters (e.g., mean and standard deviation) describing the marginal distribution under interest are extracted from the input matrix;
- for each N, and for each indicator, a value is sampled from the relative assigned marginal distribution: therefore, one of N input matrix is created;
- normalizations and aggregations are performed as in points 1,2 of the first case: a list of all the results is created in the output directory;
- mean and standard deviation of all the results are estimated across (monte_carlo_runs x pairs of combinations);  
- in this case, no randomness on the weights is allowed.


### General information and references
The aggregation functions are implemented by following [*Langhans et al.*, 2014](https://www.sciencedirect.com/science/article/abs/pii/S1470160X14002167)

The normalization functions *minmax*, *target* and *standardized* can produce negative or zero values, therefore a shift to positive values
is implemented so that they can be used also together with the aggregation functions *geometric* and *harmonic* (which require positive values).

The code implements 4 normalization and 4 aggregation functions. However, not all combinations are 
meaningful or mathematically acceptable. For more details refer to Table 6 in 
[*Gasser et al.*, 2020](https://www.sciencedirect.com/science/article/pii/S1470160X19307241)

The standard deviation of rescaled scores with any form of randomness are not saved nor plotted because they cannot bring a statistically meaningful information.
In fact, when one calculates the standard deviation after rescaling between (0,1), the denominator used in the standard deviation formula becomes smaller. 
This results in a higher relative standard deviation compared to the mean.
However, the higher relative standard deviation is not indicating a greater spread in the data but rather a consequence of the rescaling operation and 
the chosen denominator in the standard deviation calculation.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wetransform-os/ProMCDA",
    "name": "ProMCDA",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "MCDA,robustness analysis,Monte Carlo sampling,probabilistic approach",
    "author": "Flaminia Catalli - wetransform GmbH, Matteo Spada - Zurich University of Applied Sciences",
    "author_email": "flaminia.catalli@wetransform.to, matteo.spada@zhaw.ch",
    "download_url": "https://files.pythonhosted.org/packages/de/ca/e936cf546a26eb149b24717df0c6c2cdad48ea5eccf6abd133e1e70f85bb/ProMCDA-1.0.8.tar.gz",
    "platform": null,
    "description": "<div align=\"left\">\n<img src=\"https://raw.githubusercontent.com/wetransform-os/ProMCDA/release/logo/ProMCDA_logo.png\">\n<div>\n\n# Probabilistic Multi Criteria Decision Analysis\n\n<!-- [![status](https://joss.theoj.org/papers/4214c6e588774490458e34630e8052c1/status.svg)](https://joss.theoj.org/papers/4214c6e588774490458e34630e8052c1) -->\n<!-- [![PyPi version](https://img.shields.io/pypi/v/promcda?color=blue)](https://pypi.org/project/promcda) -->\n[![pytest](https://github.com/wetransform-os/ProMCDA/actions/workflows/python-app-tests.yml/badge.svg)](https://github.com/wetransform-os/ProMCDA/actions/workflows/python-app-tests.yml)\n![License](https://img.shields.io/badge/license-EPL%202.0-blue)\n\nA tool to estimate scores of alternatives and their uncertainties based on a Multi Criteria Decision Analysis (MCDA) approach.\n\n### MCDA quick overview and applications\nA MCDA approach is a systematic framework for making decisions in situations where multiple criteria or objectives need to be \nconsidered. It can be applied in various domains and contexts. Here are some possible usages of an MCDA approach:\n\n- **Environmental impact assessment**: assess the environmental consequences of various projects or policies by considering \n  multiple environmental criteria.\n- **Project selection**: choose the most suitable project from a set of alternatives by considering multiple criteria such \n  as cost, risk, and strategic alignment.\n- **Healthcare decision-making**: decide on the allocation of healthcare resources, such as funding for medical treatments \n  or the purchase of medical equipment, while considering criteria like cost-effectiveness, patient outcomes, \n  and ethical considerations. It applies to other decision-making problems too.\n- **Investment portfolio optimization**: construct an investment portfolio that balances criteria like risk, return, \n  and diversification.\n- **Personnel recruitment**: evaluate job candidates based on criteria like qualifications, experience, and cultural fit.\n- **Location analysis**: choose the optimal location for a new facility or business by considering factors like cost, \n  accessibility, and market potential.\n- **Public policy evaluation**: assess the impact of proposed policies on various criteria, such as economic growth, \n  social welfare, and environmental sustainability.\n- **Product development**: prioritize features or attributes of a new product by considering criteria like cost, market demand, \n  and technical feasibility.\n- **Disaster risk management**: identify high-risk areas and prioritize disaster preparedness and mitigation measures based \n  on criteria like vulnerability, exposure, and potential impact.\n- **Energy planning**: make decisions about energy resource allocation and investments in renewable energy sources, \n  taking into account criteria like cost, environmental impact, and reliability.\n- **Transportation planning**: optimize transportation routes, modes, and infrastructure investments while considering \n  criteria like cost, time efficiency, and environmental impact.\n- **Water resource management**: optimize water allocation for various uses, including agriculture, industry, \n  and municipal supply, while considering criteria like sustainability and equity.\n- **Urban planning**: decide on urban development projects and land-use planning based on criteria such as social equity, \n  environmental impact, and economic development.\n\nThese are just a few examples of how MCDA can be applied across a wide range of fields to support decision-making processes \nthat involve multiple, often conflicting, criteria. The specific application of MCDA will depend on the context \nand the goals of the decision-maker.\n\nBefore using ```ProMCDA```, we suggest you first to get familiar with the main steps and concepts of an MCDA method: \nthe normalization of the criteria values; their polarities and weights; and the aggregation of information into a composite indicator. \nIn MCDA context an *alternative* is one possible course of action available; an *indicator*, or *criterion*, is a parameter \nthat describes the alternatives. The variability of the MCDA scores are caused by:\n\n- the sensitivity of the algorithm to the different pairs of normalization/aggregation functions (--> sensitivity analysis);\n- the randomness that can be associated to the weights (--> robustness analysis);\n- the uncertainty associated with the indicators (--> robustness analysis).\n\nHere we define:\n- the **sensitivity analysis** as the one aimed at capturing the output score stability to the different initial modes;\n- the **robustness analysis** as the one aimed at capturing the effect of any changes in the inputs (their uncertainties) on the output scores.\n\nThe tool can be also used as a simple (i.e. deterministic) MCDA ranking tool with no robustness/sensitivity analysis (see below for instructions).\n\n### Input information needed in the configuration file\nA configuration file is needed to run```ProMCDA```.\nThe configuration file collects all the input information to run ```ProMCDA``` in your specific study case.\nYou find a configuration.json file as an example in this directory: please modify it for your needs. In the following, \nthe entries of the configuration file are described.\n\n***Path to the input matrix***, a table where rows represent the alternatives and columns represent the indicators.\nBe sure that the column containing the names of the alternatives is set as the index column, e.g. by:\n```bash\ninput_matrix = input_matrix.set_index('Alternatives').\n```\nBe sure that there are no duplicates among the rows. If the values of one or more indicators are all the same, \nthe indicators are dropped from the input matrix because they contain no information.\nExamples of input matrix:\n\n- *input matrix without uncertainties* for the indicators (see an example here: `tests/resources/input_matrix_without_uncert.csv`);\n- *input matrix with uncertainties* for the indicators (see an example here: `tests/resources/input_matrix_with_uncert.csv`).\n\nThe example input matrix with uncertainties is designed for an example where the PDFs describing the indicators are respectively: \nuniform; exact; normal (or lognormal); exact; and normal (or lognormal). Please modify it for your specific needs.\n\nIf the input matrix without uncertainties has any values of any indicators that are negative, those values are rescaled\nbetween [0,1]. This is needed because some normalization functions (as for example *target*) cannot handle negative values \nproperly.\n\nThe input matrix with uncertainties has the following characteristics:\n\n- if an indicator is described by an *exact* probability density function (PDF), one needs only a column with its values;\n- if an indicator is described by a *uniform* PDF, one needs two columns with the lowest and highest values (in this order);\n- if an indicator is described by a *normal* PDF, one needs two columns with the mean and standard deviation values (in this order);\n- if an indicator is described by a *lognormal* PDF, one needs two columns with the log(mean) and log(standard deviation) values (in this order);\n- if an indicator is described by a *Poisson* PDF, one needs only one colum with the rate.\n\nIf any mean value of any indicator is equal or smaller of its standard deviation - in case of a normal or lognormal PDF - \n```ProMCDA``` breaks to ask you if you need to investigate your data further before applying MCDA. In fact, your data shows\na high variability regarding some indicators. If you want to continue anyway, negative sampled data will be rescaled \ninto [0,1], as in the case without uncertainty.\n\n\n***List of polarities*** for each indicator, \"+\" (the higher the value of the indicator the better for the evaluation) \nor \"-\" (the lower the value of the indicator the better).\n\nThe configuration file can trigger a run with or without ***sensitivity analysis***; this is set in the `sensitivity_on` parameter (*yes* or *no*); \nif *no* is selected, then the pair normalization/aggregation should be given in `normalization` and `aggregation`. If *yes*\nis selected, then the normalization/aggregation pair is disregarded.\n\nSimilarly, a run with or without uncertainty on the indicators or on the weights (i.e. with ***robustness analysis***) \ncan be triggered by setting the `robustness_on` parameter to *yes* or *no*. If `robustness_on` is set to *yes*, then \nthe uncertainties might be on the indicators (`on_indicators`) or on the weights (`on_single_weights` or `on_all_weights`). \nIn the first case (`on_single_weights=yes`) one weight at time is randomly sampled from a uniform distribution; \nin the second case (`on_all_weights=yes`) all weights are simultaneously sampled from a normal distribution. \nIf there is no uncertainty associated to the weights, then the user should provide a ***list of weights*** for the indicators. \nThe sum of the weights should always be equal to 1 or the values will be normalised internally. \nDepending on the different options, information not needed are disregard. Sensitivity and robustness analysis can be run\ntogether. If robustness analysis is selected, it can run either on the weights or on the indicators, but not on both simultaneously.\n\nIf robustness analysis is selected, a last block of information is needed:\nthe ***Number of Monte Carlo runs***, \"N\" (default is 0, then no robustness is considered; N should be a sufficient big number, \ne.g., larger or equal than 1000). The ***number of cores*** used for the parallelization; and a \n***List of marginal distributions*** for each indicator; the available distributions are: \n  - exact, **\"exact\"**,\n  - uniform distribution, **\"uniform\"**\n  - normal distribution, **\"norm\"**\n  - lognormal distribution, **\"lnorm\"**\n  - Poisson distribution, **\"poisson\"**\n\n### Output\n\nThe user gives the ***path to output file*** (e.g. `path/output_file.csv`). In the output file the scores (normalised or rough) \nand the ranks relative to the alternatives can be found in the form of CSV tables. If the weights are iteratively sampled, \nmultiple tables are saved in a PICKLE file as an object ```dictionary```. Plots of the scores are saved in PNG images. The configuration.json file\nis saved in the output directory too; the information stored in the configuration settings are useful in case \nmultiple tests are stored and need to be reviewed.\n\nAll file names of the output objects are followed by a time stamp that group them with the specific test setting.\n\nTo retrieve a PICKLE file in Python one can:\n\n```pythongroup them \nimport pickle\n\n# Replace 'your_file.pickle' with the path to your PICKLE file\nfile_path = 'your_file.pickle'\n\n# Load the PICKLE file\nwith open(file_path, 'rb') as file:\n    data = pickle.load(file)\n\n# Now, 'data' contains the object or data stored in the PICKLE file\n```\nNote that in case of a robustness analysis, the error bars in the plots are only shown for non-normalized scores. This is\nbecause when one calculates the standard deviation after rescaling, the denominator used in the standard deviation formula \nbecomes smaller. This results in a higher relative standard deviation compared to the mean that is solely an artificial \neffect.\n  \n\n### Requirements\nOn Windows:\n```bash\nconda create --name <choose-a-name-like-Promcda> python=3.6\nactivate.bat <choose-a-name-like-Promcda>\npip install -r requirements.txt\n```\nOn Mac and Linux:\n```bash\nconda create --name <choose-a-name-like-Promcda> python=3.6\nsource activate <choose-a-name-like-Promcda>\npip install -r requirements.txt\n```\n\n### Running the code (from root dir)\nOn Windows:\n```bash\nactivate.bat <your-env>\npython3 -m mcda.mcda_run -c configuration.json\n```\nOn Mac and Linux:\n```bash\nsource activate <your-env>\npython3 -m mcda.mcda_run -c configuration.json\n```\nwhere an example of configuration file can be found in `./configuration.json`.\n\n### Running the tests\n```bash\npython3 -m pytest -s tests/unit_tests -vv\n```\n\n### Code overview: a high-level summary\nIf no robustness analysis is selected, then:\n- the indicator values are normalized by mean of all the possible normalization methods (or by the selected one);\n- the normalized indicators are aggregated by mean of all the possible aggregation methods (or by the selected one), \n  by considering their assigned weights;\n- the resulting scores of all the combinations normalization/aggregation (or the selected ones only) are provided in form \n  of a csv table and plots in png format in the output directory.\n\nIf the weights are randomly sampled (robustness analysis of the weights), then:\n- all weights or one weight at time are randomly sampled from a uniform distribution [0,1];\n- the weights are normalized so that their sum is always equal to 1;\n- if all weights are sampled together, MCDA calculations receive N-inputs (N being the number of `monte_carlo_runs`; \n  if the weights are sampled one at time, MCDA will receive (*n-inputs x num_weights*) inputs;\n- iterations 1,2,3 of the first condition follow;\n- the results of all the combinations normalization/aggregation (or the one selected) are provided in the form of mean and standard deviation over all the runs \n  (if the weights are iteratively sampled, this applies for *num_indicators-times*).\n\nIf the robustness analysis regards the indicators, then:\n- for each indicator, the parameters (e.g., mean and standard deviation) describing the marginal distribution under interest are extracted from the input matrix;\n- for each N, and for each indicator, a value is sampled from the relative assigned marginal distribution: therefore, one of N input matrix is created;\n- normalizations and aggregations are performed as in points 1,2 of the first case: a list of all the results is created in the output directory;\n- mean and standard deviation of all the results are estimated across (monte_carlo_runs x pairs of combinations);  \n- in this case, no randomness on the weights is allowed.\n\n\n### General information and references\nThe aggregation functions are implemented by following [*Langhans et al.*, 2014](https://www.sciencedirect.com/science/article/abs/pii/S1470160X14002167)\n\nThe normalization functions *minmax*, *target* and *standardized* can produce negative or zero values, therefore a shift to positive values\nis implemented so that they can be used also together with the aggregation functions *geometric* and *harmonic* (which require positive values).\n\nThe code implements 4 normalization and 4 aggregation functions. However, not all combinations are \nmeaningful or mathematically acceptable. For more details refer to Table 6 in \n[*Gasser et al.*, 2020](https://www.sciencedirect.com/science/article/pii/S1470160X19307241)\n\nThe standard deviation of rescaled scores with any form of randomness are not saved nor plotted because they cannot bring a statistically meaningful information.\nIn fact, when one calculates the standard deviation after rescaling between (0,1), the denominator used in the standard deviation formula becomes smaller. \nThis results in a higher relative standard deviation compared to the mean.\nHowever, the higher relative standard deviation is not indicating a greater spread in the data but rather a consequence of the rescaling operation and \nthe chosen denominator in the standard deviation calculation.\n\n\n",
    "bugtrack_url": null,
    "license": "EPL v 2.0",
    "summary": "A probabilistic Multi Criteria Decision Analysis",
    "version": "1.0.8",
    "project_urls": {
        "Homepage": "https://github.com/wetransform-os/ProMCDA"
    },
    "split_keywords": [
        "mcda",
        "robustness analysis",
        "monte carlo sampling",
        "probabilistic approach"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "decae936cf546a26eb149b24717df0c6c2cdad48ea5eccf6abd133e1e70f85bb",
                "md5": "9fa23dfc8634f473c39a2dea33e862e0",
                "sha256": "dec1ae0dc32f96b9954bc91405d927abd5699d6f5f8c4493cc7be591905e5750"
            },
            "downloads": -1,
            "filename": "ProMCDA-1.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "9fa23dfc8634f473c39a2dea33e862e0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 34220,
            "upload_time": "2023-11-28T10:47:21",
            "upload_time_iso_8601": "2023-11-28T10:47:21.058679Z",
            "url": "https://files.pythonhosted.org/packages/de/ca/e936cf546a26eb149b24717df0c6c2cdad48ea5eccf6abd133e1e70f85bb/ProMCDA-1.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-28 10:47:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wetransform-os",
    "github_project": "ProMCDA",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "plotly",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "scikit-learn",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "Pillow",
            "specs": []
        },
        {
            "name": "kaleido",
            "specs": []
        }
    ],
    "lcname": "promcda"
}
        
Elapsed time: 2.66683s