当前位置:网站首页>Matlab tips (18) matrix analysis -- entropy weight method
Matlab tips (18) matrix analysis -- entropy weight method
2022-06-27 08:23:00 【mozun2020】
MATLAB Tips (18) matrix analysis -- Entropy weight method
Preface
MATLAB Learning about image processing is very friendly , You can start from scratch , There are many encapsulated functions that can be called directly for basic image processing , This series of articles is mainly to introduce some of you in MATLAB Some concept functions are commonly used in routine demonstration !
Entropy weight method , Physical terms , According to the basic principles of information theory , Information is a measure of the order of a system , Entropy is a measure of the disorder of a system ; According to the definition of information entropy , For an indicator , Entropy can be used to judge the dispersion degree of an index , The smaller the information entropy , The greater the dispersion of the index , The impact of this index on Comprehensive Evaluation ( That's the weight ) The greater the , If the values of an indicator are all equal , Then the index does not play a role in the comprehensive evaluation . therefore , Information entropy can be used as a tool , Calculate the weight of each index , Provide basis for multi index comprehensive evaluation .
In information theory , Entropy is a measure of uncertainty . Entropy weight method is an objective weighting method . It's more complicated , The calculation steps are as follows :
First step : Build the judgment matrix of each evaluation index in each year .
The second step : Normalize the judgment matrix , Get the normalized judgment matrix .
The third step : According to the definition of entropy , According to the evaluation index of each year , The entropy of the evaluation index can be determined .
Step four : Define entropy weight . Defines the n After the entropy of the index , You can get the n The entropy weight of an index .
Step five : Calculate the weight value of the system .
The example encountered when searching for data , Here to share ,MATLAB Version is MATLAB2015b.
One . MATLAB Simulation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function : matrix analysis -- Entropy weight method
% Environmental Science :Win7,Matlab2015b
%Modi: C.S
% Time :2022-06-25
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Clear environment variables
clear all
clc
tic
data=[0.75 0.63 0.75 0.81 0.69 0.81 5 10 1.93548E+11 7240.681967 6.298785927 0.62 192.4661076 4.686888049 2.0 3.400000095 0.115836213 96.97335856 15.38125957 101.7018861 6.499 4 6 6 7.6 6.6 23.1 31 4.8 2.431582014 9.5 -3.61798E-05 1 1
0.75 0.5 0.69 0.81 0.63 0.75 5 10.5 2.30814E+11 8486.599333 4.831769895 0.75 176.6685921 3.280791297 5.4 3.5 0.116569495 97.55335372 16.85965181 103.3669954 4.808180972 4 6 5.7 7.6 6.5 18.9 20 4.8 2.186625121 9.5 4.54671E-05 1 1
0.75 0.5 0.69 0.81 0.63 0.75 5 10.5 2.02258E+11 7312.008314 -1.513685083 2.82 162.5590474 0.056692279 0.6 5.199999809 0.133067151 94.79421005 15.72300017 99.20792011 3.626565493 4 6 5.6 7.8 6.4 15.6 18 4.7 2.018688231 9.5 0.004690208 1 1
0.75 0.5 0.69 0.81 0.63 0.75 5 10.5 2.55017E+11 9069.041757 7.425970496 3.14 157.9448161 4.268585079 1.7 5.199999809 0.138986262 100 10.58680811 99.78332539 3.354026707 4 6 6 7.9 7.1 17.5 17 4.8 1.909757926 9.5 0.000150235 1 1
0.69 0.5 0.69 0.81 0.63 0.75 5 10.5 2.97952E+11 10427.75605 5.293784657 3.11 154.9377943 5.07443252 3.2 5.300000191 0.140462949 100.3691636 11.24594845 100.661092 2.681390308 4 6 6 8 7.5 16.4 5 4.7 1.94 9.5 6.29193E-05 1 1
0.69 0.5 0.69 0.81 0.63 0.75 5 10.5 3.14443E+11 10834.65908 5.473454192 3.04 147.841804 2.829059379 1.7 4.900000095 0.16529799 100.1058325 5.927298365 100.9644134 2.015843113 4 6 6 8 7.5 15.1 6 4.7 1.92 9.5 0.000223747 1 1
0.69 0.5 0.69 0.81 0.63 0.75 5 10.5 3.23343E+11 10973.65594 4.713453716 3.04 142.691994 3.493591567 2.1 4.900000095 0.174524422 100.5891618 3.628205878 100.5497696 1.849146571 4 6 6 8 7.5 7.6 6 4.7 1.89 9.5 0.000545649 1 1
];
fzb=data(:,[1 2 3 7 8 12 15 16 17 21 22 23 27 28 30 31]);% Take negative index
zzb=data(:,[4 5 6 9:11 13 14 18:20 24:26 29 32:34]);% Take the positive indicator
M=zzb;
x2=fzb;
N = (M - min(M(:)))/(max(M(:))-min(M(:)));% Positive index normalization
N2 = ( max(x2(:))-x2)/(max(x2(:))-min(x2(:)));% Negative index normalization
x=[N2(:,[1 2 3]),N(:,[1 2 3]),N2(:,[4 5]),N(:,4:6),N2(:,6),N(:,7:8),N2(:,[7 8 9]),N(:,9:11),N2(:,[10 11 12]),N(:,12:14),N2(:,[13 14]),N(:,15),N2(:,[15 16]),N(:,16:18)];
x1=x;
y=[];
[m,n]=size(x1);
for i=1:n
y(:,i)=x1(:,i)/sum([x1(:,i)]) ; % Matrix standardization
end
for l=1:n
s(1,l)=0;
for j=1:m
if y(j,l)==0;%%%%%%%%“==” Is equal to “=” It's assignment
p(1,l)=0;
s(1,l)=s(1,l);
else
p(1,l)=y(j,l)*log(y(j,l));
s(1,l)=s(1,l)+p(1,l);
end
end
end
k=(log(m))^(-1);
e=-k*s;
h=ones(1,n)-e;
w=h/sum(h) % Index weight value
toc
Two . Simulation results
w =
1 to 13 Column
0.0000 0.0000 0.0000 0.0000 0.0001 0.0001 -0.0000 0.0001 0.0307 0.0219 0.2730 0.0011 0.0078
14 to 26 Column
0.1017 0.0021 0.0007 0.0000 0.0004 0.1246 0.0001 0.0026 0.0000 -0.0000 0.0004 0.0003 0.0025
27 to 34 Column
0.0725 0.3573 0.0001 0.0000 -0.0000 0.0000 0.0000 0.0000
Time has passed 0.046010 second .

3、 ... and . Summary
An example of matrix entropy weight calculation , It may be used later , Take a note here . Learn one every day MATLAB Little knowledge , Let's learn and make progress together !
边栏推荐
- ServletConfig与ServletContext
- (original) custom drawable
- 2022.06.26(LC_6100_统计放置房子的方式数)
- vim 从嫌弃到依赖(19)——替换
- JVM层次上的对象的创建过程和内存布局
- Persistence mechanism of redis
- Redis master-slave replication and sentinel mode
- L'enquête en aveugle a montré que les femmes étaient meilleures que les hommes.
- ZABBIX deployment instructions (server+win client + switch (H3C))
- LVGL GUI GUIDER移植代码到STM32
猜你喜欢

Ue5 magic power - POI solution

MySQL环境变量配置的教程

正确的理解MySQL的MVCC

【11. 二维差分】

SPARQL basic introductory exercise

Experience record of Luogu's topic brushing
![【批处理DOS-CMD命令-汇总和小结】-批处理命令中的参数%0、%1、%2、%[0-9]、%0-9和批处理命令参数位置切换命令shift,dos命令中操作符%用法](/img/05/19299c47d54d4ede95322b5a923093.png)
【批处理DOS-CMD命令-汇总和小结】-批处理命令中的参数%0、%1、%2、%[0-9]、%0-9和批处理命令参数位置切换命令shift,dos命令中操作符%用法

PayPal账户遭大规模冻结!跨境卖家如何自救?

PayPal account has been massively frozen! How can cross-border sellers help themselves?

【c ++ primer 笔记】第4章 表达式
随机推荐
並發編程JUC的AQS底層源碼
针对直播痛点的关键技术解析——首帧秒开、清晰度、流畅度
Redis configuration file details
Redis transactions
并发编程JUC的AQS底层源码
Read datasets iteratively with xgboost
Understanding mvcc in MySQL transactions is super simple
SPARQL基础入门练习
The 6th Blue Bridge Cup
2022.06.26(LC_6101_判断矩阵是否是一个 X 矩阵)
Redis的持久化机制
"Short video" Linxia fire rescue detachment carries out fire safety training
【论文阅读】Intrinsically semi-supervised methods
PayPal账户遭大规模冻结!跨境卖家如何自救?
Analysis log log
L'introduction en bourse de Wild Wind Pharmaceutical a pris fin: Yu pinzeng, qui avait l'intention de lever 540 millions de RMB, a effectué un investissement P2P.
win10-如何管理开机启动项?
How much do you know about the cause of amplifier distortion?
游戏资产复用:更快找到所需游戏资产的新方法
Time function calculation efficiency of C