Table of contents
2. Establish a judgment matrix
foreword
I have simply used the AHP in coursework before, and this time I will study it again systematically and write a study note!
1. Process introduction
- build hierarchy
- Build a judgment matrix
- Calculating weights, consistency checks
- Calculate the score to draw conclusions
2. Model realization
1. Build a Hierarchy
Explore the ranking of urban tourism competitiveness of the following five cities: Chengdu, Hangzhou, Changsha.
Select the six indicators of the criterion layer to establish the following hierarchical structure:
2. Build a judgment matrix
For the pairwise comparison of the importance of elements of the same level with respect to a certain criterion in the previous level, construct a pairwise comparison matrix (judgment matrix)
1. Empower the indicators
factor i than factor j | quantized value |
Equally important | 1 |
slightly important | 3 |
stronger important | 5 |
strongly important | 7 |
extremely important | 9 |
Adjacent judgment intermediate value | 2、4、6、8 |
2. Establish a judgment matrix
Each factor in the matrix needs to be manually filled in according to experience:
index |
A1
|
A2
|
A3
|
A4
|
A5
|
A6
|
A1
|
1 | 1/2 | 1/3 | 1/5 | 3 | 5 |
A2
|
2 | 1 | 1/2 | 1/4 | 4 | 4 |
A3
|
3 | 2 | 1 | 1/3 | 4 | 5 |
A4 | 5 | 4 | 3 | 1 | 5 | 6 |
A5
|
1/3 | 1/4 | 1/4 | 1/5 | 1 | 3 |
A6
|
1/5 | 1/4 | 1/5 | 1/6 | 1/3 | 1 |
3. Hierarchical single sorting and consistency check
1. Standard layer
In simple terms, hierarchical single sorting is to calculate the weight of each index of the judgment matrix;
%matlab代码
A = [1,1/2,1/3,1/5,3,5;
2,1,1/2,1/4,4,4;
3,2,1,1/3,4,5;
5,4,3,1,5,6;
1/3,1/4,1/4,1/5,1,3;
1/5,1/4,1/5,1/6,1/3,1;];
[x,y] = eig(A); eigenvalue = diag(y);
Lmax = max(eigenvalue); %计算最大特征值
n = size(A,1); %计算判断矩阵阶数
w = x(:,1)/sum(x(:,1)); %计算归一化权向量
CI = (Lmax-n)/(n-1);
RI = [0 0 0.58 0.90 1.12 1.24 1.32 1.41 1.45 1.49 1.51];
CR = CI/RI(n); %计算 CR
The result is as follows:
CI |
0.0839 |
CR | 0.0677 |
Lmax (maximum characteristic root) | 6.4195 |
w (weight) | [0.1089,0.1503,0.2188,0.4269,0.0593,0.0358] |
CI=0.0839<0.1, indicating that the judgment matrix passed the consistency test.
2. Program layer
Establish a judgment matrix A1 for the factor of the number of tourists:
number of tourists | Chengdu | hangzhou | Changsha |
Chengdu | 1 | 3 | 5 |
hangzhou | 1/3 | 1 | 3 |
Changsha | 1/5 | 1/3 | 1 |
In this way, six judgment matrices are established and the weights are calculated and the consistency test is performed:
All of the above have passed the consistency test, and the original data will be given later.
4. Calculate the score
Multiply the weight matrix of the criterion layer and the weight matrix of the scheme layer to obtain the final scores of the three cities and perform normalization
The result is: that is, the final rankings are Chengdu, Hangzhou, and Changsha.
3. Method Analysis
advantage:
- Systematic: Analytic Hierarchy Process takes the research object as a system, and makes decisions according to the way of thinking of decomposition, comparison and judgment, and synthesis
- Simplicity: This method neither purely pursues advanced mathematics, nor pays one-sided attention to behavior, logic, and reasoning, but organically combines qualitative and quantitative methods
- Extensive: Analytic Hierarchy Process mainly starts from the evaluator's understanding of the nature and elements of the evaluation problem, and emphasizes qualitative analysis and judgment more than general quantitative methods
shortcoming:
- Confined to the old: only one can be selected from the original plan, and there is no way to come up with a better new plan
- Subjectivity: the selection of indicators, the construction of judgment matrix and other links need to be led by humans, which lacks popularity
- Ambiguity: pay attention to qualitative, do not require high data volume, lack of quantitative methods, it is difficult to solve the problem of large data volume
Summarize
This time I used an example I used before for improvement. I hope you can correct me if there are mistakes.
In order to simplify the whole process, only three cities and six indicators were selected. If you want the original data, you can private message or comment
Also ask for a like! !