Observed since 21 Oct, 09:43 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
The AHP-Gaussian Decision Support Library is a extensible solution designed for multi-criteria decision-making (MCDM) leveraging both traditional and advanced AHP methodologies
The AHP-Gaussian Decision Support Library is a extensible solution designed for multi-criteria decision-making (MCDM) leveraging both traditional and advanced AHP methodologies. It provides an implementation of Saaty's Analytic Hierarchy Process (AHP) and an enhanced Gaussian-based AHP, developed to handle complex scenarios involving a large number of criteria. This library is structured to facilitate the application of decision-support systems in research, data analysis, and organizational decision-making processes.
.
├── ahp_gaussian.py # Gaussian-AHP class for advanced MCDM with Gaussian factors
├── ahp_saaty.py # Traditional AHP class implementing Saaty’s methodology
├── config_manager.py # YAML-based configuration manager
├── create_csv_files.py # Script to generate sample CSV files for testing
├── data/ # Folder to store decision and judgment matrices
├── decision_helper.py # Helper functions for matrix validation, normalization, and aggregation
├── main.py # Primary script to execute decision-making processes
├── requirements.txt # Library dependencies
├── results/ # Folder to save result outputs, including CSVs and visualizations
├── settings/ # Configuration directory with YAML settings
└── tests/ # Unit tests for functional validation
Each module is structured to allow modular application and customization for specific decision-making frameworks.
To use this library, clone the repository and install the required dependencies:
git clone <repository_url>
cd <repository_name>
pip install -r requirements.txt
The main.py script is designed as the primary entry point, which initializes configurations, loads matrices, and executes both AHP-Saaty and AHP-Gaussian analyses. It automatically saves output results in the results/ directory and provides optional visualizations.
Data Preparation: Ensure that decision_matrix.csv and judgment_matrix.csv are available in the data/ directory. These files should represent the decision criteria and pairwise comparisons, respectively.
Run Analysis: Execute the main script:
python main.py
Results: Results are stored in the results/ directory. The directory includes global and local preference CSV files and graphical representations.
The create_csv_files.py script provides an example decision matrix and judgment matrix. Execute it to generate sample data for testing purposes:
python create_csv_files.py
ahp_gaussian.pyThe AHPGaussian class is a novel, scalable approach to multi-criteria decision-making. By analyzing the sensitivity of criteria weights using Gaussian distribution factors, this method circumvents the need for pairwise comparison, allowing it to handle large matrices efficiently.
Attributes:
local_preference: Matrix of alternatives' local preferences for each criterion.gaussian_factor: Represents the criteria's variance as a proportion of the mean, essential for weight calculation.weights: Weighting of each criterion based on Gaussian sensitivity analysis.Core Methods:
global_preference(): Ranks alternatives by global preference scores.visualize_decision_matrix(), visualize_local_preference(), visualize_global_preference(): Visualize decision matrices and preferences.ahp_saaty.pyThe AHPSaaty class implements the traditional AHP method, where criteria weights are derived from a reciprocal pairwise comparison matrix. This method validates the consistency of the judgments using Saaty’s Consistency Ratio (CR).
Attributes:
weights: Criterion weights derived from normalized judgment matrices.cr: Consistency ratio to evaluate the matrix's adherence to transitivity.Core Methods:
local_preference(decision_matrix): Computes alternative preferences for each criterion.global_preference(decision_matrix): Provides global ranking based on combined criterion weights.config_manager.pyManages external configuration through a YAML file (ahp_settings.yaml), enabling users to define decision-making parameters such as consistency indices and objectives.
YAML Configuration:
consistency_index:
"1": 0
"2": 0
"3": 0.58
"4": 0.9
"5": 1.12
"6": 1.24
"7": 1.32
"8": 1.41
"9": 1.45
"10": 1.49
"11": 1.51
"12": 1.48
"13": 1.56
"14": 1.57
"15": 1.59
decision_helper.pyDecisionHelper is a utility class providing essential operations such as:
Key Methods:
normalize_decision_matrix(): Adjusts each criterion based on optimization objectives (maximize or minimize).aggregate_matrix(): Aggregates preferences with weights to produce global rankings.plot_* functions for detailed visual representations.The library offers in-depth visual analysis for decision matrices and preferences, with heatmaps and bar charts generated using Matplotlib and Seaborn. These visualizations are essential for interpreting judgment consistency, criterion weighting, and preference rankings.
from ahp_saaty import AHPSaaty
import pandas as pd
# Load judgment matrix
judgment_matrix = pd.read_csv('data/judgment_matrix.csv', index_col=0)
# Perform Saaty's AHP analysis
ahp_saaty = AHPSaaty(judgment_matrix, objective='max')
local_preferences = ahp_saaty.local_preference(decision_matrix)
global_preferences = ahp_saaty.global_preference(decision_matrix)
# Visualize results
ahp_saaty.visualize_judgment_matrix()
ahp_saaty.visualize_global_preference(decision_matrix)
The results are saved as follows:
results/local_pref_saaty.csvresults/global_pref_saaty.csvresults/global_pref_gaussian.csvEach output file provides a ranked listing of alternatives based on the respective method's calculated scores.
Unit tests are provided for all core modules under tests/. The tests ensure functional accuracy of criteria weighting, consistency validation, preference calculation, and result aggregation. To execute tests:
pytest tests/
pandas for data manipulationmatplotlib and seaborn for data visualizationyaml for configuration managementDownload counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.4 | 13 Nov 2024 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:43 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:65a66aa7cfbf5e99d49213f0cdb1b365418d73ff504fc39ac230f2fd593578fe