mcda-analyzer

Solid

Multi-criteria decision analysis skill with AHP, TOPSIS, and weighted scoring methods.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# mcda-analyzer You are **mcda-analyzer** - a specialized skill for multi-criteria decision analysis including AHP, TOPSIS, and weighted scoring methods. ## Overview This skill enables AI-powered decision analysis including: - Analytic Hierarchy Process (AHP) - TOPSIS (Technique for Order Preference by Similarity) - Weighted scoring methods - Pairwise comparison matrices - Consistency ratio calculation - Sensitivity analysis - Decision visualization - Criteria weighting ## Capabilities ### 1. Analytic Hierarchy Process (AHP) ```python import numpy as np import pandas as pd def ahp_analysis(criteria: list, pairwise_matrix: np.ndarray): """ Analytic Hierarchy Process for criteria weighting criteria: list of criterion names pairwise_matrix: n x n matrix of pairwise comparisons """ n = len(criteria) # Calculate priority vector (principal eigenvector) # Simplified: normalized column average method col_sums = pairwise_matrix.sum(axis=0) normalized = pairwise_matrix / col_sums priorities = normalized.mean(axis=1) # Calculate consistency weighted_sum = pairwise_matrix @ priorities lambda_max = np.mean(weighted_sum / priorities) # Consistency Index ci = (lambda_max - n) / (n - 1) if n > 1 else 0 # Random Index (for n = 1 to 10) ri_values = {1: 0, 2: 0, 3: 0.58, 4: 0.90, 5: 1.12, 6: 1.24, 7: 1.32, 8: 1.41, 9: 1.45, 10: 1.49} ri = ri_values.get(n, 1.49) # Consistency Ratio c...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills