# pyDEMATEL
[](https://opensource.org/licenses/BSD-3-Clause)

## Table of Contents
- [Overview](#overview)
- [License](#license)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Authors](#authors)
- [Contact](#contact)
## Overview
The `pyDEMATEL` tool is designed to implement and facilitate the use of the DEMATEL and Fuzzy DEMATEL methods. The tool comprises three distinct classes: `DEMATELSolver`, `FuzzyDEMATELSolver`, and `DEMATELWindow`.
- **DEMATELSolver**: Implements the standard DEMATEL method.
- **FuzzyDEMATELSolver**: Implements the Fuzzy DEMATEL method.
- **DEMATELWindow**: Provides a graphical interface for users to interact with the tool.
This separation is designed to offer two ways of using the tool:
1. **Graphical Interface Mode**: Allows decision-makers to use the tool directly via its graphical interface provided by the `DEMATELWindow` class.
2. **Package Integration Mode**: Allows developers to directly integrate the `DEMATELSolver` or `FuzzyDEMATELSolver` classes into their own applications, without needing the graphical interface.
## License
This project is licensed under the BSD License - see the [LICENSE](LICENSE.md) file for details.
## Features
- **Feature 1**: Data Acquisition Methods: Acquires numbers and names of experts and factors and gathers evaluation matrix values from each expert.
- **Feature 2**: Matrix Generation Steps: Computes the "direct-influence matrix Z", generates the "normalized direct-influence matrix X", creates the "total-influence matrix T" and produces an "influential Relation Map IRM".
- **Feature 3**: Output Presentation Methods: Presents outputs in various formats, including graphical representations and provides options to generate Excel documents.
- **Feature 4**: Integration and Flexibility: Designed for integration into Python-based programs and Implements the DEMATEL method comprehensively, ensuring accuracy and completeness.
## Installation
### Prerequisites
Before you begin, ensure that `Python` and `pip` are installed and updated on your system.
### Steps to Install
To install the `pyDEMATEL` package, use the following command:
```sh
pip install pyDEMATEL
```
The following libraries are installed automatically with `pyDEMATEL`:
- [numpy](https://numpy.org/)
- [matplotlib](https://matplotlib.org/)
- [openpyxl](https://openpyxl.readthedocs.io/en/stable/)
## Usage
Use the following command to execute the graphical interface of the `pyDEMATEL` software:
```sh
pydematel
```
The steps to follow are : :
- **Step 1**: Enter the number of experts and the number of factors.
- **Step 2**: Provide the names of experts and factors.
- **Step 3**: Choose the solving method: either DEMATEL or FuzzyDEMATEL
- **Step 4**: Enter the evaluation matrix for each expert.
- **Step 5**: Generate the results.
### Example
**Here is an example demonstrating how to use the FuzzyDEMATELSolver package, which implements the FuzzyDEMATEL method**:
```sh
from pyDEMATEL.FuzzyDEMATELSolver import FuzzyDEMATELSolver
import numpy as np
# Inputs: experts and factors
expert = "bob"
factors = ["A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9",
"A10",
"A11",
"A12",
"A13",
"A14",
"A15",
"A16",
"A17",
"A18"]
# Linguistic evaluation matrix of marine experts’ consensus in other words evaluation matrix for each expert (source https://www.sciencedirect.com/science/article/pii/S0950423015300498)
evaluationMatrix=[
[(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1)],
[(0.5, 0.75, 1),(0, 0, 0.25),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.75, 1, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.5, 0.75, 1)],
[(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0, 0.25),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75)],
[(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.75, 1, 1),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0.75, 1, 1),(0.5, 0.75, 1),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5)],
[(0, 0.25, 0.5),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.75, 1, 1),(0.5, 0.75, 1),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1)],
[(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.75, 1, 1)],
[(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75)],
[(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25)],
[(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0, 0.25)],
[(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.75, 1, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.5, 0.75, 1)],
[(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.75, 1, 1),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0, 0.25),(0.75, 1, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1)],
[(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.75, 1, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0.75, 1, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1)],
[(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0.75, 1, 1),(0.25, 0.5, 0.75),(0.75, 1, 1),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5)],
[(0, 0.25, 0.5),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1)],
[(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.75, 1, 1),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0.75, 1, 1),(0.25, 0.5, 0.75),(0.5, 0.75, 1)],
[(0, 0.25, 0.5),(0.75, 1, 1),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1),(0.75, 1, 1)],
[(0, 0, 0.25),(0.5, 0.75, 1),(0.75, 1, 1),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.25, 0.5, 0.75)],
[(0, 0.25, 0.5),(0.5, 0.75, 1),(0.75, 1, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25)]
]
matrices = np.array([np.array(evaluationMatrix, dtype=object)])
# Creating an instance of FuzzyDEMATELSolver
solver = FuzzyDEMATELSolver()
solver.setMatrix(matrices)
print('********* expert s individual direct influence matrices *********')
print(solver.getMatrix())
solver.addExpert(expert)
solver.setFactors(factors)
solver.setNumberOfExperts(1)
solver.setNumberOfFactors(18)
print('********* List of experts *********')
print(solver.getExperts())
print('********* List of Factors *********')
print(solver.getFactors())
# Executing the steps of the FuzzyDEMATEL method
solver.step1()
print('********* Direct Influence Fuzzy Matrix *********')
print(solver.getFuzzyDirectInfluenceMatrix())
solver.step2()
print('********* Normalized Direct Influence Fuzzy Matrix *********')
print(solver.getFuzzyNormalizedDirectInfluenceMatrix())
solver.step3()
print('********* Total Influence Fuzzy Matrix *********')
print(solver.getFuzzyTotalInfluenceMatrix())
solver.step4()
print('********* Relation *********')
print(solver.getRalation())
print('********* Prominence *********')
print(solver.getProminence())
# Generating the graph
solver.drawCurve()
# Generating excel file
solver.savexl(input("Please enter the destination path for the Excel file:"))
```
**Here is an example demonstrating how to use the DEMATELSolver package, which implements the Classical DEMATEL method**:
```sh
from pyDEMATEL.DEMATELSolver import DEMATELSolver
import numpy as np
# Inputs: experts and factors
expert = "bob"
factors = [ "A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8"]
# Average matrix in other words evaluation matrix for each expert (source https://imisc.figshare.com/articles/journal_contribution/paper-codal-etal_pdf/7325816/3)
matrices= [np.array([[0.00, 1.11, 1.01, 1.41, 1.66, 0.50, 1.60, 2.00],
[1.43, 0.00, 2.22, 2.00, 2.40, 1.20, 1.66, 1.33],
[0.82, 1.00, 0.00, 2.05, 2.44, 1.65, 2.65, 1.88],
[1.92, 0.80, 1.82, 0.00, 2.75, 3.50, 3.33, 3.10],
[2.20, 3.11, 1.25, 0.75, 0.00, 2.25, 2.66, 1.75],
[1.01, 1.31, 1.45, 1.20, 1.44, 0.00, 0.75, 3.00],
[3.50, 3.20, 2.95, 3.33, 2.88, 1.85, 0.00, 1.40],
[0.50, 1.25, 1.40, 3.66, 1.00, 2.00, 3.33, 0.00]])]
# Creating an instance of DEMATELSolver
solver = DEMATELSolver()
solver.setMatrix(matrices)
print('********* expert s individual direct influence matrices *********')
print(solver.getMatrix())
solver.addExpert(expert)
solver.setFactors(factors)
solver.setNumberOfExperts(1)
solver.setNumberOfFactors(8)
print('********* List of experts *********')
print(solver.getExperts())
print('********* List of Factors *********')
print(solver.getFactors())
# Executing the steps of the DEMATEL method
solver.step1()
print('********* Direct Influence Matrix *********')
print(solver.getDirectInfluenceMatrix())
solver.step2()
print('********* Normalized Direct Influence Matrix *********')
print(solver.getNormalizedDirectInfluenceMatrix())
solver.step3()
print('********* Total Influence Matrix *********')
print(solver.getTotalInfluenceMatrix())
solver.step4()
print('********* Relation *********')
print(solver.getRalation())
print('********* Prominence *********')
print(solver.getProminence())
# Generating the graph
solver.drawCurve()
# Generating excel file
solver.savexl(input("Please enter the destination path for the Excel file:"))
```
## Authors
- Abderrahman Chekry<sup>1</sup>
- Jamal Bakkas<sup>1</sup>
- Mohamed Hanine<sup>2</sup>
- Elizabeth Caro Montero<sup>3,4,5</sup>
- Mirtha Silvana Garat de Marin<sup>3,7,8</sup>
- Imran Ashraf<sup>8</sup>
<br/><sup>1</sup>LAPSSII Laboratory, Graduate School of Technology, Cadi Ayyad University, Safi, Morocco.
<br/><sup>2</sup>LTI Laboratory, ENSA, Chouaib Doukkali University, El Jadida, Morocco.
<br/><sup>3</sup>Universidad Europea del Atlantico. Isabel Torres 21, 39011 Santander, Spain.
<br/><sup>4</sup>Universidad Internacional Iberoamericana Campeche 24560, Mexico.
<br/><sup>5</sup>Universidad de La Romana. La Romana, Republica Dominicana.
<br/><sup>6</sup>Universidad Internacional Iberoamericana Arecibo, Puerto Rico 00613, USA.
<br/><sup>7</sup>Universidade Internacional do Cuanza. Cuito, Bie, Angola.
<br/><sup>8</sup>Department of Information and Communication Engineering, Yeungnam University, Gyeongsan 38541, South Korea.
## Contact
If you have any questions or suggestions, feel free to contact us at a.chekry@uca.ac.ma.
Raw data
{
"_id": null,
"home_page": "https://github.com/achekry/-Elsevier-SoftwareX-pyDEMATEL",
"name": "pyDEMATEL",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Abderrahman Chekry, Jamal Bakkas, Mohamed Hanin, Elizabeth Caro Montero, Mirtha Silvana Garat de Marin and Imran Ashraf",
"author_email": "a.chekry@uca.ac.ma",
"download_url": "https://files.pythonhosted.org/packages/c4/6c/48c3d2118fe4cc37fb3c9fa0ea01fbe6a3774017451ba083a7c806c78dfb/pydematel-0.2.2.tar.gz",
"platform": null,
"description": "# pyDEMATEL\r\n\r\n[](https://opensource.org/licenses/BSD-3-Clause)\r\n\r\n\r\n\r\n## Table of Contents\r\n- [Overview](#overview)\r\n- [License](#license)\r\n- [Features](#features)\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [Authors](#authors)\r\n- [Contact](#contact)\r\n\r\n\r\n## Overview\r\n\r\nThe `pyDEMATEL` tool is designed to implement and facilitate the use of the DEMATEL and Fuzzy DEMATEL methods. The tool comprises three distinct classes: `DEMATELSolver`, `FuzzyDEMATELSolver`, and `DEMATELWindow`.\r\n\r\n- **DEMATELSolver**: Implements the standard DEMATEL method.\r\n- **FuzzyDEMATELSolver**: Implements the Fuzzy DEMATEL method.\r\n- **DEMATELWindow**: Provides a graphical interface for users to interact with the tool.\r\n\r\nThis separation is designed to offer two ways of using the tool:\r\n\r\n1. **Graphical Interface Mode**: Allows decision-makers to use the tool directly via its graphical interface provided by the `DEMATELWindow` class.\r\n2. **Package Integration Mode**: Allows developers to directly integrate the `DEMATELSolver` or `FuzzyDEMATELSolver` classes into their own applications, without needing the graphical interface.\r\n\r\n## License\r\nThis project is licensed under the BSD License - see the [LICENSE](LICENSE.md) file for details.\r\n\r\n## Features\r\n\r\n- **Feature 1**: Data Acquisition Methods: Acquires numbers and names of experts and factors and gathers evaluation matrix values from each expert.\r\n- **Feature 2**: Matrix Generation Steps: Computes the \"direct-influence matrix Z\", generates the \"normalized direct-influence matrix X\", creates the \"total-influence matrix T\" and produces an \"influential Relation Map IRM\".\r\n- **Feature 3**: Output Presentation Methods: Presents outputs in various formats, including graphical representations and provides options to generate Excel documents.\r\n- **Feature 4**: Integration and Flexibility: Designed for integration into Python-based programs and Implements the DEMATEL method comprehensively, ensuring accuracy and completeness.\r\n\r\n## Installation\r\n\r\n### Prerequisites\r\nBefore you begin, ensure that `Python` and `pip` are installed and updated on your system.\r\n\r\n### Steps to Install\r\nTo install the `pyDEMATEL` package, use the following command:\r\n\r\n```sh\r\npip install pyDEMATEL\r\n```\r\nThe following libraries are installed automatically with `pyDEMATEL`:\r\n- [numpy](https://numpy.org/)\r\n- [matplotlib](https://matplotlib.org/)\r\n- [openpyxl](https://openpyxl.readthedocs.io/en/stable/)\r\n\r\n## Usage\r\nUse the following command to execute the graphical interface of the `pyDEMATEL` software:\r\n\r\n```sh\r\npydematel\r\n```\r\n The steps to follow are : :\r\n- **Step 1**: Enter the number of experts and the number of factors.\r\n- **Step 2**: Provide the names of experts and factors.\r\n- **Step 3**: Choose the solving method: either DEMATEL or FuzzyDEMATEL\r\n- **Step 4**: Enter the evaluation matrix for each expert.\r\n- **Step 5**: Generate the results.\r\n\r\n### Example\r\n\r\n**Here is an example demonstrating how to use the FuzzyDEMATELSolver package, which implements the FuzzyDEMATEL method**:\r\n```sh\r\nfrom pyDEMATEL.FuzzyDEMATELSolver import FuzzyDEMATELSolver\r\nimport numpy as np\r\n\r\n# Inputs: experts and factors\r\nexpert = \"bob\"\r\nfactors = [\"A1\", \r\n \"A2\", \r\n \"A3\", \r\n \"A4\", \r\n \"A5\", \r\n \"A6\", \r\n \"A7\", \r\n \"A8\",\r\n \"A9\",\r\n \"A10\", \r\n \"A11\", \r\n \"A12\", \r\n \"A13\", \r\n \"A14\", \r\n \"A15\", \r\n \"A16\", \r\n \"A17\", \r\n \"A18\"] \r\n \r\n# Linguistic evaluation matrix of marine experts\u00e2\u20ac\u2122 consensus in other words evaluation matrix for each expert (source https://www.sciencedirect.com/science/article/pii/S0950423015300498)\r\nevaluationMatrix=[\r\n[(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1)],\r\n[(0.5, 0.75, 1),(0, 0, 0.25),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.75, 1, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.5, 0.75, 1)],\r\n[(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0, 0.25),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75)],\r\n[(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.75, 1, 1),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0.75, 1, 1),(0.5, 0.75, 1),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5)],\r\n[(0, 0.25, 0.5),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.75, 1, 1),(0.5, 0.75, 1),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1)],\r\n[(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.75, 1, 1)],\r\n[(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75)],\r\n[(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25)],\r\n[(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0, 0.25)],\r\n[(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.75, 1, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.5, 0.75, 1)],\r\n[(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.75, 1, 1),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0, 0.25),(0.75, 1, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1)],\r\n[(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.75, 1, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0.75, 1, 1),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1)],\r\n[(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0.75, 1, 1),(0.25, 0.5, 0.75),(0.75, 1, 1),(0, 0.25, 0.5),(0.5, 0.75, 1),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5)],\r\n[(0, 0.25, 0.5),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0, 0, 0.25),(0.5, 0.75, 1)],\r\n[(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.75, 1, 1),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0.5, 0.75, 1),(0.5, 0.75, 1),(0, 0, 0.25),(0.75, 1, 1),(0.25, 0.5, 0.75),(0.5, 0.75, 1)],\r\n[(0, 0.25, 0.5),(0.75, 1, 1),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.25, 0.5, 0.75),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.5, 0.75, 1),(0.75, 1, 1)],\r\n[(0, 0, 0.25),(0.5, 0.75, 1),(0.75, 1, 1),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0.25, 0.5),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0, 0, 0.25),(0.25, 0.5, 0.75)],\r\n[(0, 0.25, 0.5),(0.5, 0.75, 1),(0.75, 1, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0.25, 0.5),(0, 0, 0.25),(0, 0, 0.25),(0, 0.25, 0.5),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0.25, 0.5, 0.75),(0, 0.25, 0.5),(0, 0, 0.25),(0.25, 0.5, 0.75),(0.5, 0.75, 1),(0, 0.25, 0.5),(0, 0, 0.25)]\r\n] \r\n\r\nmatrices = np.array([np.array(evaluationMatrix, dtype=object)])\r\n\r\n# Creating an instance of FuzzyDEMATELSolver\r\nsolver = FuzzyDEMATELSolver()\r\nsolver.setMatrix(matrices)\r\nprint('********* expert s individual direct influence matrices *********')\r\nprint(solver.getMatrix())\r\nsolver.addExpert(expert)\r\nsolver.setFactors(factors)\r\nsolver.setNumberOfExperts(1)\r\nsolver.setNumberOfFactors(18)\r\nprint('********* List of experts *********')\r\nprint(solver.getExperts())\r\nprint('********* List of Factors *********')\r\nprint(solver.getFactors())\r\n\r\n# Executing the steps of the FuzzyDEMATEL method\r\nsolver.step1()\r\nprint('********* Direct Influence Fuzzy Matrix *********')\r\nprint(solver.getFuzzyDirectInfluenceMatrix())\r\nsolver.step2()\r\nprint('********* Normalized Direct Influence Fuzzy Matrix *********')\r\nprint(solver.getFuzzyNormalizedDirectInfluenceMatrix())\r\nsolver.step3()\r\nprint('********* Total Influence Fuzzy Matrix *********')\r\nprint(solver.getFuzzyTotalInfluenceMatrix())\r\nsolver.step4()\r\nprint('********* Relation *********')\r\nprint(solver.getRalation())\r\nprint('********* Prominence *********')\r\nprint(solver.getProminence())\r\n\r\n# Generating the graph\r\nsolver.drawCurve()\r\n\r\n# Generating excel file\r\nsolver.savexl(input(\"Please enter the destination path for the Excel file:\"))\r\n\r\n```\r\n\r\n**Here is an example demonstrating how to use the DEMATELSolver package, which implements the Classical DEMATEL method**:\r\n```sh\r\nfrom pyDEMATEL.DEMATELSolver import DEMATELSolver\r\nimport numpy as np\r\n\r\n# Inputs: experts and factors\r\nexpert = \"bob\"\r\nfactors = [ \"A1\", \r\n \"A2\", \r\n \"A3\", \r\n \"A4\", \r\n \"A5\", \r\n \"A6\", \r\n \"A7\", \r\n \"A8\"]\r\n \r\n# Average matrix in other words evaluation matrix for each expert (source https://imisc.figshare.com/articles/journal_contribution/paper-codal-etal_pdf/7325816/3)\r\nmatrices= [np.array([[0.00, 1.11, 1.01, 1.41, 1.66, 0.50, 1.60, 2.00], \r\n [1.43, 0.00, 2.22, 2.00, 2.40, 1.20, 1.66, 1.33], \r\n [0.82, 1.00, 0.00, 2.05, 2.44, 1.65, 2.65, 1.88], \r\n [1.92, 0.80, 1.82, 0.00, 2.75, 3.50, 3.33, 3.10], \r\n [2.20, 3.11, 1.25, 0.75, 0.00, 2.25, 2.66, 1.75], \r\n [1.01, 1.31, 1.45, 1.20, 1.44, 0.00, 0.75, 3.00], \r\n [3.50, 3.20, 2.95, 3.33, 2.88, 1.85, 0.00, 1.40], \r\n [0.50, 1.25, 1.40, 3.66, 1.00, 2.00, 3.33, 0.00]])]\r\n\r\n\r\n# Creating an instance of DEMATELSolver\r\nsolver = DEMATELSolver()\r\nsolver.setMatrix(matrices)\r\nprint('********* expert s individual direct influence matrices *********')\r\nprint(solver.getMatrix())\r\nsolver.addExpert(expert)\r\nsolver.setFactors(factors)\r\nsolver.setNumberOfExperts(1)\r\nsolver.setNumberOfFactors(8)\r\nprint('********* List of experts *********')\r\nprint(solver.getExperts())\r\nprint('********* List of Factors *********')\r\nprint(solver.getFactors())\r\n\r\n# Executing the steps of the DEMATEL method\r\nsolver.step1()\r\nprint('********* Direct Influence Matrix *********')\r\nprint(solver.getDirectInfluenceMatrix())\r\nsolver.step2()\r\nprint('********* Normalized Direct Influence Matrix *********')\r\nprint(solver.getNormalizedDirectInfluenceMatrix())\r\nsolver.step3()\r\nprint('********* Total Influence Matrix *********')\r\nprint(solver.getTotalInfluenceMatrix())\r\nsolver.step4()\r\nprint('********* Relation *********')\r\nprint(solver.getRalation())\r\nprint('********* Prominence *********')\r\nprint(solver.getProminence())\r\n\r\n# Generating the graph\r\nsolver.drawCurve()\r\n\r\n# Generating excel file\r\nsolver.savexl(input(\"Please enter the destination path for the Excel file:\"))\r\n\r\n```\r\n\r\n\r\n## Authors\r\n- Abderrahman Chekry<sup>1</sup>\r\n- Jamal Bakkas<sup>1</sup>\r\n- Mohamed Hanine<sup>2</sup>\r\n- Elizabeth Caro Montero<sup>3,4,5</sup>\r\n- Mirtha Silvana Garat de Marin<sup>3,7,8</sup>\r\n- Imran Ashraf<sup>8</sup>\r\n<br/><sup>1</sup>LAPSSII Laboratory, Graduate School of Technology, Cadi Ayyad University, Safi, Morocco.\r\n<br/><sup>2</sup>LTI Laboratory, ENSA, Chouaib Doukkali University, El Jadida, Morocco.\r\n<br/><sup>3</sup>Universidad Europea del Atlantico. Isabel Torres 21, 39011 Santander, Spain.\r\n<br/><sup>4</sup>Universidad Internacional Iberoamericana Campeche 24560, Mexico.\r\n<br/><sup>5</sup>Universidad de La Romana. La Romana, Republica Dominicana.\r\n<br/><sup>6</sup>Universidad Internacional Iberoamericana Arecibo, Puerto Rico 00613, USA.\r\n<br/><sup>7</sup>Universidade Internacional do Cuanza. Cuito, Bie, Angola.\r\n<br/><sup>8</sup>Department of Information and Communication Engineering, Yeungnam University, Gyeongsan 38541, South Korea.\r\n\r\n## Contact\r\nIf you have any questions or suggestions, feel free to contact us at a.chekry@uca.ac.ma.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "pyDematel a python-based tool implementing the Dematel and fuzzy Dematel methods for improved decision making",
"version": "0.2.2",
"project_urls": {
"Homepage": "https://github.com/achekry/-Elsevier-SoftwareX-pyDEMATEL"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1028538f8e0a6336895b02ad87ffa55b5242275901f00bf1b38f1e43afb9a874",
"md5": "879c9964b26ea88b1f0e7c985d898cc1",
"sha256": "4912bbb11cebf4ce36bf48cf84dfcbe89e2569bf2ed65c883b83a0927221fce2"
},
"downloads": -1,
"filename": "pyDEMATEL-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "879c9964b26ea88b1f0e7c985d898cc1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 17003,
"upload_time": "2024-08-18T22:14:04",
"upload_time_iso_8601": "2024-08-18T22:14:04.388446Z",
"url": "https://files.pythonhosted.org/packages/10/28/538f8e0a6336895b02ad87ffa55b5242275901f00bf1b38f1e43afb9a874/pyDEMATEL-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c46c48c3d2118fe4cc37fb3c9fa0ea01fbe6a3774017451ba083a7c806c78dfb",
"md5": "9e41f592468e518498bfb1547c0165d0",
"sha256": "958304265557fb739281c52ac9a6aa357c0f674dd02b88a2130a5852dbc4422d"
},
"downloads": -1,
"filename": "pydematel-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "9e41f592468e518498bfb1547c0165d0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 16704,
"upload_time": "2024-08-18T22:14:06",
"upload_time_iso_8601": "2024-08-18T22:14:06.075439Z",
"url": "https://files.pythonhosted.org/packages/c4/6c/48c3d2118fe4cc37fb3c9fa0ea01fbe6a3774017451ba083a7c806c78dfb/pydematel-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-18 22:14:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "achekry",
"github_project": "-Elsevier-SoftwareX-pyDEMATEL",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pydematel"
}