当前位置:网站首页>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
边栏推荐
- Five minutes to show you what JWT is
- R语言使用timeROC包计算存在竞争风险情况下的生存资料多时间AUC值、使用cox模型、并添加协变量、R语言使用timeROC包的plotAUCcurve函数可视化多时间生存资料的AUC曲线
- Solution to PowerDesigner's failure to connect to MySQL in x64 system
- 论文写作 19: 会议论文与期刊论文的区别
- STM32 Basics
- SRS deployment
- Historical track data reading of Holux m1200-e Bluetooth GPS track recorder
- Building the tide, building the foundation and winning the future -- the successful holding of zdns Partner Conference
- 堡垒机、跳板机JumpServer的搭建,以及使用,图文详细
- Mysql database and table building: the difference between utf8 and utf8mb4
猜你喜欢

Operation of numpy array

SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions

【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码

selenium. common. exceptions. WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT

RT-1052学习笔记 - GPIO架构分析

Wave field Dao new species end up, how does usdd break the situation and stabilize the currency market?

An error is reported when sqoop imports data from Mysql to HDFS: sqlexception in nextkeyvalue

AQS learning

Livego + ffmpeg + RTMP + flvjs to realize live video

Numpy - creation of data type and array
随机推荐
微信中金财富高端专区安全吗,证券如何开户呢
【PTA】L1-006 连续因子
Introduction to link database function of cadence OrCAD capture CIS replacement components, graphic tutorial and video demonstration
STM32 Basics
堡垒机、跳板机JumpServer的搭建,以及使用,图文详细
Openharmony open source developer growth plan, looking for new open source forces that change the world!
Is the wechat CICC wealth high-end zone safe? How to open an account for securities
SIGIR'22「微软」CTR估计:利用上下文信息促进特征表征学习
Solution to PowerDesigner's failure to connect to MySQL in x64 system
Zdns was invited to attend the annual conference of Tencent cloud basic resources and share the 2020 domain name industry development report
SIGIR'22 "Microsoft" CTR estimation: using context information to promote feature representation learning
Es index (document name) fuzzy query method (database name fuzzy query method)
Confusion about thread blocking after calling the read () method of wrapper flow
Numpy sort search count set
R语言ggplot2可视化分面图(facet_wrap)、使用lineheight参数自定义设置分面图标签栏(灰色标签栏)的高度
[problem solving] 'ASCII' codec can't encode characters in position XX XX: ordinal not in range (128)
The second method of file upload in form form is implemented by fileitem class, servletfileupload class and diskfileitemfactory class.
Alicloud: could not connect to SMTP host: SMTP 163.com, port: 25
How to do product innovation—— Exploration of product innovation methodology I
程序设计语言基础(2)