熵权法在MATLAB中的代码实现
分享兴趣,传播快乐,增长见闻,留下美好!亲爱的您,这里是LearningYard学苑。
今天小编为大家带来《熵权法在MATLAB中的代码实现》,一起来看看吧!
⚡ 多图预警!建议连接WIFI阅读!⚡【1】基础概念
按照信息论基本原理的解释,信息是系统有序程度的一个度量,熵是系统无序程度的一个度量;根据信息熵的定义,对于某项指标,可以用熵值来判断某个指标的离散程度,其信息熵值越小,指标的离散程度越大, 该指标对综合评价的影响(即权重)就越大,如果某项指标的值全部相等,则该指标在综合评价中不起作用。
申农最先将原本属于热力学概念的熵引入信息论,信息熵现已在工程技术、社会经济等领域得到广泛的应用。熵权法的一般原理就是:如果某个指标的信息熵越小,就表明其指标值的变异程度越大,提供的信息量越大,在综合评价中所起的作用越大,则其权重也应越大。反之,某指标的信息熵越大,就表明其指标值的变异程度越小,提供的信息量越小,在综合评价中所起的作用越小,则其权重也应越小。而指标的熵权值的原理与其熵的效果正好相反。因此,可利用信息熵这个工具,计算出各个指标的权重,为多指标综合评价提供依据。
【2】决策步骤
本文截取文献[1]中的内容,并作简要说明,具体细节以原文为准。
(1)决策矩阵归一化
该步骤目的在于将矩阵所有数据的数值规定在0-1区间内标准化后的数据才能进行进一步处理。
(2)计算属性熵值
这里没有截取完整,当z=0时,规定z*ln(z)的值为0。信息熵决定该属性的"含金量",即指标所包含的信息多少,同时也可表示该属性的重要程度。
(3)计算属性权重
根据所得出的熵值,通过上述公式可计算出各属性的对应熵权,决策结束。【3】代码详解
(0)构建初始矩阵
以属性值为实数、规格为4*8且权重完全未知的感知效用矩阵为例,根据熵权法求出所有指标属性的权重。
这里借助原初矩阵(4*8)的规格,定义感知效用的行列:
(1)决策矩阵归一化
根据归一化公式,编写如下代码完成操作:
规范化后矩阵变化为:
(2)计算属性熵值
对公式进行分解,先求z的值:
再把z*ln(z)的值求出来,这里需要注意的是ln函数只需要用log()即可进行表示。然后顺便再把k的值求解。
根据公式,得到属性熵值:
得到的结果如下:
(3)计算属性权重
有了熵值后就可按照公式求出各属性的权重了,具体代码如下:
以下就是所要求得的权重结果:
【4】总结
熵权法是一个求权重比较简单的的方法,其步骤简便,容易上手。在模型研究中,很多文献针对未知权重都采用了熵权法对指标属性进行测评。现在熵权法正被不断优化改进,不仅可适用于多种属性值的计算,还具备其他附加的特殊效果。总的来说,熵权法对于每一位决策研究中都是应该掌握的基础方法,值得一学。
【英语学习】
According to the explanation of the basic principles of information theory, information is a measure of the degree of order of the system, and entropy is a measure of the degree of disorder of the system; according to the definition of information entropy, for an indicator, entropy can be used to judge the degree of dispersion of an indicator , The smaller the information entropy value, the greater the degree of dispersion of the index, and the greater the influence of the index on the comprehensive evaluation (ie, the weight). If the values of an index are all equal, the index has no effect in the comprehensive evaluation.
Shennong was the first to introduce entropy, which was originally a concept of thermodynamics, into information theory. Information entropy has now been widely used in engineering technology, social economy and other fields. The general principle of the entropy method is: if the information entropy of an indicator is smaller, it indicates that the degree of variation of its indicator value is greater, the amount of information provided is greater, and the greater the role it plays in the comprehensive evaluation, its weight Should also be bigger. Conversely, the greater the information entropy of an indicator, the smaller the degree of variation of its indicator value, the smaller the amount of information provided, and the smaller the role it plays in the comprehensive evaluation, the smaller its weight should be. The principle of the index"s entropy weight is just the opposite of its entropy effect. Therefore, the tool of information entropy can be used to calculate the weight of each indicator to provide a basis for comprehensive evaluation of multiple indicators.
本期的分享就到这里,如果您对今天的文章有独特的想法,欢迎给我们留言,让我们相约明天,祝您今天过得开心快乐!
本文由LearningYard学苑原创,仅代表作者个人观点,如有侵权请联系删除。
翻译参考来源:Google翻译。
内容参考来源:
[1] 武慧娟, 张海涛, 王尽晖, 孙鸿飞, 李泽中. 基于熵权法的网络舆情预警模糊综合评价模型研究[J]. 情报科学,2018,36(07):58-61.
[2] 张俊光, 宋喜伟, 杨双. 基于熵权法的关键链项目缓冲确定方法[J]. 管理评论,2017,29(01):211-219.
[3] 百度百科——熵权法
【感谢阅读】