AHP方法 - 层次分析法
AHP方法 - 层次分析法
定义
The Analytic Hierarchy Process (AHP), developed by Thomas L. Saaty in the 1970s, is a structured technique for organizing and analyzing complex decisions. ProgramLangCompare uses AHP to combine 30 heterogeneous metrics into a single, defensible ranking of programming languages.
AHP Steps
- Decompose the decision into a hierarchy: goal (best language) -> criteria (30 metrics) -> alternatives (200 languages).
- Pairwise comparison: build a 30x30 judgment matrix comparing the relative importance of each metric pair on a 1-9 Saaty scale.
- Derive weights via the principal eigenvector of the judgment matrix.
- Consistency check: compute the Consistency Ratio (CR = CI / RI). A CR <= 0.10 is acceptable.
- Score alternatives: normalize each metric value to 0-1, then compute the weighted sum per language.
Judgment Matrix
The pairwise comparison matrix A satisfies A * w = lambda_max * w, where w is the weight vector. Weights are normalized so that sum(w_i) = 1.
Consistency Index
CI = (lambda_max - n) / (n - 1), where n is the number of criteria. RI is the average CI of randomly generated matrices of size n. CR = CI / RI. Our weights yield CR < 0.10, indicating acceptable consistency.