当前位置:网站首页>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 !
边栏推荐
- vim 从嫌弃到依赖(19)——替换
- If xn > 0 and X (n+1) /xn > 1-1/n (n=1,2,...), Prove that the series Σ xn diverges
- How much do you know about the cause of amplifier distortion?
- Zabbix部署说明(Server+Win客户端+交换机(H3C))
- Read datasets iteratively with xgboost
- 【12. 最大连续不重复子序列】
- L'enquête en aveugle a montré que les femmes étaient meilleures que les hommes.
- ZABBIX deployment instructions (server+win client + switch (H3C))
- Lvgl description 3 about the use of lvgl Guide
- 【批处理DOS-CMD命令-汇总和小结】-输出/显示命令——echo
猜你喜欢

win命令行中导入、导出数据库相关表

Associated GIS: all roads lead to ue5 City

【批处理DOS-CMD命令-汇总和小结】-环境变量、路径变量、搜索文件位置相关指令——set、path、where,cmd命令的路径参数中有空格怎么办

JVM层次上的对象的创建过程和内存布局

2022.06.26(LC_6100_统计放置房子的方式数)

L'enquête en aveugle a montré que les femmes étaient meilleures que les hommes.

Blind survey shows that female code farmers are better than male code farmers

(resolved) the following raise notimplementederror occurs when Minet tests

【13. 二进制中1的个数、位运算】

爬一个网页的所有导师信息
随机推荐
LVGL GUI GUIDER移植代码到STM32
並發編程JUC的AQS底層源碼
Design of a solar charge pump power supply circuit
盲测调查显示女码农比男码农更优秀
Redis configuration file details
【11. 二维差分】
How can I import data from Oracle into fastdfs?
粗读DS-TransUNet: Dual Swin Transformer U-Net for Medical Image Segmentation
Understanding mvcc in MySQL transactions is super simple
After working in a large factory for ten years with an annual salary of 400000 yuan, I was suddenly laid off. If the company wanted to abandon you, it wouldn't leave any kindness
Redis的事务
[10. difference]
正确的理解MySQL的MVCC
ZABBIX deployment instructions (server+win client + switch (H3C))
SQL Sever column name or number of supplied values does not match the table definition
Preliminary understanding of C #
【论文阅读】Intrinsically semi-supervised methods
Closure problem
(resolved) the following raise notimplementederror occurs when Minet tests
Refer to | the computer cannot access the Internet after the hotspot is turned on in win11