当前位置:网站首页>Comprehensive evaluation and decision-making method
Comprehensive evaluation and decision-making method
2022-07-26 04:15:00 【Selvaggia】
Comprehensive evaluation and decision-making methods
TOPSIS Law
principle
Positive ideal solution C ∗ C^* C∗ It's a scheme set D D D Virtual best solution that does not exist in , Each attribute value is the best value of the attribute in the decision matrix ; And negative ideal solution C 0 C^0 C0 Is the worst virtual solution , Each attribute value is the worst value of the attribute in the decision matrix . stay In the dimension , Set scheme D D D Alternatives in d i d_i di And positive ideal solution C ∗ C^* C∗ And negative ideal solution D D D Compare the distance , It is close to the positive ideal solution and far away from the negative ideal solution The scheme of is the scheme set D D D The best solution in ; And the scheme set can be arranged accordingly D D D Priority of alternatives in .
The concept of using ideal solution to solve multi-attribute decision-making problem is simple , As long as an appropriate distance measure is defined in the attribute space, the distance between the alternative solution and the ideal solution can be calculated .TOPSIS The method uses Euclidean distance . As for using both positive and negative ideal solutions, it is because when only positive ideal solutions are used Sometimes there will be situations where the distance between some two alternatives and the rational solution is the same , In order to distinguish the advantages and disadvantages of the two schemes , Introduce the negative ideal solution and calculate the distance between the two schemes and the negative ideal solution , The scheme with the same distance from the positive ideal solution is far from the negative ideal solution .
Specific steps
Data preprocessing
Consistency :
Attributes have many types , Include Benefit type 、 Cost type and interval type etc. . These three properties , The greater the benefit type attribute, the better , The smaller the cost attribute, the better , Interval type attribute is the best in a certain interval .
Make the type of attribute consistent , The better the performance of the scheme under any attribute in the table, the greater the attribute value after transformation .



clc, clear
x2=@(qujian,lb,ub,x)(1-(qujian(1)-x)./(qujian(1)-lb)).*...
(x>=lb & x<qujian(1))+(x>=qujian(1) & x<=qujian(2))+...
(1-(x-qujian(2))./(ub-qujian(2))).*(x>qujian(2) & x<=ub);
% The above statement defines the anonymous function of the transformation , The statement is too long , Two continuation characters are used
% f=@( Input parameters ) expression
qujian=[5,6]; lb=2; ub=12; % Optimal interval , Can't tolerate the lower and upper bounds
x2data=[5 6 7 10 2]'; %x2 Property value
y2=x2(qujian,lb,ub,x2data) % Call anonymous functions , Perform data transformation
Normalization

Different from several transformations introduced below , It is impossible to distinguish the merits of attribute values from the size of attribute values after transformation . Its biggest feature is , After normalization , The sum of squares of the same attribute value of each scheme is 1, Therefore, it is often used to calculate various schemes and some virtual schemes ( Such as ideal point or negative ideal point ) Euclidean distance of the occasion .
for j=1:n
b(:,j)=a(:,j)/norm(a(:,j)); % Vector programming
end
Dimensionless :
When analyzing and evaluating with various multi-attribute decision-making methods , It is necessary to eliminate the influence of the selection of dimensions on the decision-making or evaluation results , This is dimensionless 
y=zscore(x);
normalization :
The value of attribute values of different indicators in the attribute value table varies greatly , In order to direct , In order to facilitate the use of various multi-attribute decision-making and evaluation methods for evaluation , It is necessary to normalize the values in the attribute value table , That is, change the values in the table to [0,1] On interval
x = x − m i n m a x − m i n x=\displaystyle \frac{x-min}{max-min} x=max−minx−min
A = m a p m i n m a x mapminmax mapminmax(A,0,1);% normalization
mapminmax Standardize the data line by line , Normalize each row of data to an interval [ymin, ymax] Inside , The calculation formula is :y = (ymax-ymin)*(x-xmin)/(xmax-xmin) + ymin.YMIN and YMAX Call for mapminmax The parameters that are set in the function , If these two parameters are not set , This is normalized to the interval by default [-1, 1] Inside . The data after standardization is Y,PS Standardize the mapped structure for the record
[y1,PS] = mapminmax(x1,ymin,ymax)
When it is necessary to normalize another set of data , You can use the following method to do the same normalization
y2 = mapminmax('apply',x2,PS)
When you need to restore the unified data , You can use the following command :
x1_again= mapminmax('reverse',y1,PS)
Besides , Non linear transformation or other methods can also be used in attribute specification , To solve or partially solve the nonlinear relationship between the achievement degree of some goals and attribute values , And the incomplete compensation between goals . There are several common attribute normalization methods .
Weighted matrix

[m,n]=size(b);
c=b.*repmat(w,m,1);
Determine positive and negative ideal solutions

Cstar=max(c) % Find the positive ideal solution , Each attribute takes the optimal value ,max Take the maximum value of each column
Cstar(4)=min(c(:,4)) % attribute 4 It is cost type , Take the smallest
C0=min(c); %q Find the negative ideal solution
C0(4)=max(c(:,4)) % attribute 4 It is cost type
The distance from each scheme to the positive and negative ideal solution

for i=1:m
Sstar(i)=norm(c(i,:)-Cstar); % Find the distance to the positive ideal solution
S0(i)=norm(c(i,:)-C0); % Find the distance to the negative ideal
end
perhaps
Sstar=vecnorm(c-Cstar,2,2) % Line by line calculation 2 Norm is the distance to the positive ideal solution
S0=vecnorm(c-C0,2,2) % Line by line calculation 2 Norm is the distance to the negative ideal solution
Calculation Comprehensively evaluate the index and rank

f=S0./(Sstar+S0);
[sf,ind]=sort(f,'descend') % Find the sorting result
Complete code

For uniformity , Only for interval attributes Transformed , The cost attribute doesn't matter
Vector normalization , Make the square sum of the same attribute of each scheme be 1, It is convenient to calculate the distance to the ideal solution
When finding the ideal solution , Consider the cost type attribute , The value with the lowest cost attribute is selected in the optimal scheme
There is no standardized treatment ( Eliminate dimensionality )
It's not normalized ( The value of attribute values of different indicators varies greatly )
clc, clear
format short g
a=[0.1 5 5000 4.7
0.2 6 6000 5.6
0.4 7 7000 6.7
0.9 10 10000 2.3
1.2 2 400 1.8];
[m,n]=size(a);
% a=zscore(a) Eliminate dimensionless , Standardization ( Normalization , The following normalization should be called Modularization )
% First eliminate dimensionless , The column of interval attribute will not fall within the acceptable interval
x2=@(qujian,lb,ub,x)(1-(qujian(1)-x)./(qujian(1)-lb)).*...
(x>=lb & x<qujian(1))+(x>=qujian(1) & x<=qujian(2))+...
(1-(x-qujian(2))./(ub-qujian(2))).*(x>qujian(2) & x<=ub);
qujian=[5,6]; lb=2; ub=12;
a(:,2)=x2(qujian,lb,ub,a(:,2)); % For interval attributes 2 To transform
a=zscore(a); % First do a good job in interval attributes, and then eliminate dimensionless
for j=1:n
b(:,j)=a(:,j)/norm(a(:,j)); % Vector normalization Normalize the matrix
end
% b=a./vecnorm(a) % No, no, No ,2016 Version cannot be used vecnorm
b
w=[0.2 0.3 0.4 0.1];
c=b.*repmat(w,m,1) % Find the weighting matrix ,repmat Stack matrix
Cstar=max(c) % Find the positive ideal solution , Each attribute takes the optimal value ,max Take the maximum value of each column
Cstar(4)=min(c(:,4)) % attribute 4 It is cost type , Take the smallest
C0=min(c); %q Find the negative ideal solution
C0(4)=max(c(:,4)) % attribute 4 It is cost type
for i=1:m
Sstar(i)=norm(c(i,:)-Cstar); % Find the distance to the positive ideal solution
S0(i)=norm(c(i,:)-C0); % Find the distance to the negative ideal
end
f=S0./(Sstar+S0);
[sf,ind]=sort(f,'descend') % Find the sorting result
% Sstar=vecnorm(c-Cstar,2,2) % Line by line calculation 2 Norm is the distance to the positive ideal solution
% S0=vecnorm(c-C0,2,2) % Line by line calculation 2 Norm is the distance to the negative ideal solution
% f=S0./(Sstar+S0)
% [sf,ind]=sort(f,'descend') % Find the sorting result
边栏推荐
- Linear basis property function code to achieve 3000 words detailed explanation, with examples
- 吴恩达机器学习课后习题——线性回归
- Wechat applet to realize music player (4) (use pubsubjs to realize inter page communication)
- 支持代理直连Oracle数据库,JumpServer堡垒机v2.24.0发布
- Chapter 18: explore the wonders of the mean in the 2-bit a~b system, specify the 3x+1 conversion process of integers, specify an interval to verify the angular Valley conjecture, explore the number of
- [SVN] please execute the 'cleanup' command appears all the time. The solution is that there is no response after cleanup
- The second article, which is still unfinished, will be introduced again, and continue to explain oracledb_ Exporter monitors Oracle, a very low intrusive monitoring scheme.
- Seat / safety configuration upgrade is the administrative experience of the new Volvo S90 in place
- Retail chain store cashier system source code management commodity classification function logic sharing
- Method of test case design -- move combination, causal judgment
猜你喜欢

Luoda Development -- the context of sidetone configuration

SEGGER Embedded Studio找不到xxx.c或者xxx.h文件

MATLAB绘图

1. Mx6u-alpha development board (main frequency and clock configuration experiment)

Communication protocol and message format between microservices

makefile知识再整理(超详细)

HelloWorld case analysis

When you try to delete all bad code in the program | daily anecdotes

p-范数(2-范数 即 欧几里得范数)

(翻译)网站流程图和用户流程图的使用时机
随机推荐
Trust sums two numbers
Uniapp pit filling Tour
华为高层谈 35 岁危机,程序员如何破年龄之忧?
redux
[Reading Notes - > data analysis] 01 introduction to data analysis
5 years, 1.4W times, NFT og's road to immortality Web3 column
What are the duplicate check rules for English papers?
Apisex's exploration in the field of API and microservices
[question 019: what is the understanding of spherecastcommand in unity?]
How to write the introduction and conclusion of an overview paper?
Web Test Method Encyclopedia
Retail chain store cashier system source code management commodity classification function logic sharing
The PHP Eval () function can run a string as PHP code
规则引擎Drools的使用
[Reading Notes - > data analysis] Introduction to BDA textbook data analysis
[in depth study of 4g/5g/6g topic-42]: urllc-13 - in depth interpretation of 3GPP urllc related protocols, specifications and technical principles -7-low delay technology-1-subcarrier spacing expansio
PHP object conversion array
构建关系抽取的动词源
JS upload avatar (you can understand it after reading it, trust me)
[digital ic/fpga] Hot unique code detection