当前位置:网站首页>Matlab analytic hierarchy process to quickly calculate the weight
Matlab analytic hierarchy process to quickly calculate the weight
2022-04-23 20:20:00 【Install a sound 77】
Analytic hierarchy process (AHP) is a very useful decision algorithm
Although the content is equal to patting the head , But sometimes we just need to find the right way to pat our heads .
Although it is often used to solve the problem of multi-objective selection , But we can also analyze the factors , Get a factor weight .
Of course, the weight of each factor , An evaluation matrix needs to be established ( That is, pat your head )
This paragraph matlab The code immediately uses the evaluation matrix to calculate the content of weight , It is equivalent to the first half of the goal decision , Very simple and practical .
% Analytic hierarchy process
A=[1 1/4 1/2 1/3 1/9;4 1 3 2 1/4;2 1/3 1 1/2 1/7;3 1/2 2 1 1/5;9 4 7 5 1];
[n,n]=size(A);
x=ones(n,100);
y=ones(n,100);
m=zeros(1,100);
m(1)=max(x(:,1))
y(:,1)=x(:,1);
x(:,2)=A*y(:,1);
m(2)=max(x(:,2))
y(:,2)=x(:,2)/m(2);
p=0.0001;i=2;k=abs(m(2)-m(1));
while k>p
i=i+1;
x(:,i)=A*y(:,i-1);
m(i)=max(x(:,i));
y(:,i)=x(:,i)/m(i);
k=abs(m(i)-m(i-1));
end
a=sum(y(:,i));
31
w=y(:,i)/a;
t=m(i)
disp(w)
[v,d]=eig(A);
r=d(1,1);
CI=(r-n)/(n-1);
RI=[0 0 0.58 0.9 1012 1.24 1.32 1.41 1.45]
CR=CI/RI(n)
if CR<0.1
CR_result=' adopt '
else
CR_result=' Not through '
end
disp('CR_result')
版权声明
本文为[Install a sound 77]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210551491458.html
边栏推荐
- Local call feign interface message 404
- An error is reported when sqoop imports data from Mysql to HDFS: sqlexception in nextkeyvalue
- Installation and use of NVM
- DTMF双音多频信号仿真演示系统
- Investigate why close is required after sqlsession is used in mybatties
- JDBC database addition, deletion, query and modification tool class
- 腾讯邱东洋:深度模型推理加速的术与道
- Plato Farm元宇宙IEO上线四大,链上交易颇高
- 波场DAO新物种下场,USDD如何破局稳定币市场?
- [numerical prediction case] (3) LSTM time series electricity quantity prediction, with tensorflow complete code attached
猜你喜欢
Commit and ROLLBACK in DCL of 16mysql
Leetcode dynamic planning training camp (1-5 days)
Leetcode XOR operation
Servlet learning notes
LeetCode动态规划训练营(1~5天)
Numpy Index & slice & iteration
Azkaban recompile, solve: could not connect to SMTP host: SMTP 163.com, port: 465 [January 10, 2022]
[text classification cases] (4) RNN and LSTM film evaluation Tendency Classification, with tensorflow complete code attached
How to protect ECs from hacker attacks?
[graph theory brush question-5] Li Kou 1971 Find out if there is a path in the graph
随机推荐
R language survival package coxph function to build Cox regression model, ggrisk package ggrisk function and two_ Scatter function visualizes the risk score map of Cox regression, interprets the risk
Use the rolling division method to find the maximum common divisor of two numbers
Recommend an open source free drawing software draw IO exportable vector graph
DNS cloud school | analysis of hidden tunnel attacks in the hidden corner of DNS
NC basic usage 2
[talkative cloud native] load balancing - the passenger flow of small restaurants has increased
Vericrypt file hard disk encryption tutorial
Remote code execution in Win 11 using wpad / PAC and JScript
Numpy Index & slice & iteration
Commit and rollback in DCL of 16 MySQL
The second method of file upload in form form is implemented by fileitem class, servletfileupload class and diskfileitemfactory class.
Redis installation (centos7 command line installation)
R language ggplot2 visual facet_wrap, and use the lineheight parameter to customize the height of the facet icon tab (gray label bar)
Computing the intersection of two planes in PCL point cloud processing (51)
Confusion about thread blocking after calling the read () method of wrapper flow
还在用 ListView?使用 AnimatedList 让列表元素动起来
PIP installation package reports an error. Could not find a version that satisfies the requirement pymysql (from versions: none)
JDBC database addition, deletion, query and modification tool class
Introduction to electron tutorial 3 - process communication
aqs的学习