Metadata-Version: 2.1
Name: wmsd
Version: 1.0.0
Summary: TOPSIS ranking and interpretation using WMSD-space
Author-email: Maciej Woś <maciejwos01@gmail.com>, Bogna Kilanowska <bogna.kilanowska@student.put.poznan.pl>, Adam Ciesiółka <adam.ciesiolka@student.put.poznan.pl>
License: MIT License
        
        Copyright (c) 2023 Adam Ciesiółka, Bogna Kilanowska, Maciej Woś
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: repository, https://github.com/dabrze/topsis-msd-improvement-actions
Keywords: visualization,ranking,multi-criteria-decision-aid,mcda,topsis,explainability
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dataclasses
Requires-Dist: jupyter
Requires-Dist: numpy ==1.26.0
Requires-Dist: pandas ~=1.5
Requires-Dist: scikit-learn ==1.3.0
Requires-Dist: matplotlib ==3.8.0
Requires-Dist: plotly ==5.17.0
Requires-Dist: pytest ==7.4.2
Requires-Dist: ipython ==8.15.0
Requires-Dist: pymoo ~=0.6.0
Requires-Dist: pyscipopt
Requires-Dist: sphinx ==7.1.2
Requires-Dist: sphinx-rtd-theme ==1.3.0rc1
Requires-Dist: nbformat

# TOPSIS ranking and interpretation using WMSD-space
![](https://github.com/dabrze/topsis-msd-improvement-actions/actions/workflows/build.yml/badge.svg)

This repository hosts the code for **MSDTransformer** - a scikit-learn compatible python library, that lets you create TOPSIS rankings of alternatives, visualize rankings in WMSD space, and get suggestions for improvement actions. 
<!-- Check out the project's [documentation](https://msdtransformer.readthedocs.io/en/latest/index.html) to learn more about using the MSDTransformer.  -->

## Requirements

MSDTransformer uses PySCIPOpt to determine exact WMSD boundaries quickly. If you use conda, you should be fine performing the follwoing command (easier option):
```console
conda install --channel conda-forge pyscipopt
``` 
If you use PyPI, then you will need a working installation of the [SCIP Optimization
Suite](https://www.scipopt.org/) (harder option, but might run faster). Please, make sure that your SCIP installation works, before installing MSDTransformer. For more details on how to install SCIP, please refer to the [PySCIPOpt documentation](https://github.com/scipopt/PySCIPOpt/blob/master/INSTALL.md).

After installing PySCIPOpt (or if you already have SCIP installed), you can install the other dependencies by running:
```console
pip install -r requirements.txt
```
## Installation

<!-- ### From PyPI

This is the simplest (one-command) install method is to run the following command in your terminal:

```console
pip install MSDtransformer
```

### From source -->

Once you have all the dependencies, you can install MSDTransformer from source. To do so, clone the repository and run the following command in the root directory of the repository:

```console
pip install .
```

## Quickstart

```python
import pandas as pd
from MSDTransformer import MSDTransformer

df = pd.read_csv("../data/students.csv", sep=';', index_col= 0)
students_transformer = MSDTransformer("R") # Relative distance
students_transformer.fit(df, expert_range=[[0,100],[1,6],[1,6]])
students_transformer.transform(df)
```

![Transformed data frame](notebooks/figures/quickstart_transform.png)

```python
students_transformer.show_ranking()
```

![Ranking](./notebooks/figures/quickstart_ranking.png)

```python
students_transformer.plot()
```

![MSD plot](notebooks/figures/quickstart_plot.png)

## Citation

If you use this project in your research, please consider citing the following papers:

- [Susmaga, R. *et al.* (2023) MSD-space: Visualizing the inner-workings of TOPSIS aggregations. *European Journal of Operational Research*, 308(1), 229-242.](https://doi.org/10.1016/j.ejor.2022.12.003)
- [Susmaga, R. *et al.* (2023) Towards Explainable TOPSIS: Visual Insights into the Effects of Weights and Aggregations on Rankings. Arxiv preprint.](
https://doi.org/10.48550/arXiv.2306.07706)

