当前位置:网站首页>Matlab tips (28) fuzzy comprehensive evaluation
Matlab tips (28) fuzzy comprehensive evaluation
2022-07-05 08:27:00 【mozun2020】
MATLAB Tips (28) Fuzzy comprehensive evaluation
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 !
Fuzzy comprehensive evaluation method is a comprehensive evaluation method based on Fuzzy Mathematics . The comprehensive evaluation method converts qualitative evaluation into quantitative evaluation according to the membership theory of Fuzzy Mathematics , That is to use fuzzy mathematics to make an overall evaluation of things or objects restricted by many factors . It has clear results , The characteristics of strong systematicness , It can better solve the fuzzy 、 Difficult to quantify , It is suitable for solving various uncertain problems .
The most remarkable feature of fuzzy comprehensive evaluation method is :
Compare with each other
Take the optimal evaluation factor value as the benchmark , Its evaluation value is 1; Other evaluation factors that are not optimal can get corresponding evaluation values according to the degree of suboptimal .Function relation
According to the characteristics of various evaluation factors , Determine the functional relationship between the evaluation value and the evaluation factor value ( namely : Membership function ). Determine this functional relationship ( Membership function ) There are many ways , for example ,F Statistical methods , All kinds of F Distribution, etc . Of course , Experienced bid evaluation experts can also be invited to evaluate , Directly give the evaluation value .
In the preparation of bidding documents , It should be based on the specific situation of the project , Select evaluation factors with emphasis , Scientifically determine the functional relationship between the evaluation value and the evaluation factor value, and reasonably determine the weight of the evaluation factor . General steps of fuzzy comprehensive evaluation :
Construction of fuzzy comprehensive evaluation index
Fuzzy comprehensive evaluation index system is the basis of comprehensive evaluation , Whether the selection of evaluation indicators is appropriate , It will directly affect the accuracy of the comprehensive evaluation . The construction of the evaluation index should widely involve the industry data of the evaluation index system or relevant laws and regulations .Use to build a good weight vector
Through expert experience or AHP The analytic hierarchy process constructs the weight vector .Construct membership matrix
Establish a suitable membership function to construct a membership matrix .Synthesis of membership matrix and weight
It is synthesized with suitable synthesis factors , And explain the result vector .
Simulation example MATLAB Version is MATLAB2015b.
One . MATLAB Simulation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function : This procedure is a fuzzy comprehensive evaluation procedure , Artificial weight
% Environmental Science :Win7,Matlab2015b
%Modi: C.S
% Time :2022-06-27
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% I. Clear environment variables
clear all
clc
tic
%--------------------------------------------------------------------------
% The program runs , Enter the command directly mohu that will do
% This program can be extended
% For the two-level fuzzy comprehensive evaluation , Can be compiled mohufun.m Function to implement
% Such as [yy1,qdh,qdh1]=mohufun(R,L,M,w,XX,yy] To run this function twice , And prepare corresponding m file , Two of these functions can be implemented
% The result of fuzzy evaluation shows :
%1: The sum of membership degrees for all levels is 1.
%2: The output results increase with the increase of a variable qdh1 The result shows monotonic increasing or decreasing
%3: The final grade is [0.2 0 0 0.8] This is normal , It is different from the concept of hierarchical distance in extension evaluation .
% Only variables belong to 0.2 At this level .
%--------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This part is calculated by , Artificially given part , That is, the relevant solution conditions
% It is required to input part before calculation
R=4; % Number of influencing factors
L=4; % The number of grades of judgment
M=29; % Number of tunnel sections to be evaluated
w=[0.1 0.7 0.1 0.1];% Weight of each indicator
% Classical domain of extension evaluation , Form a group every day , share L Group , From left to right, it is 1,2,3,4
% The judgment result is 1, Means it belongs to the leftmost classical field , by 4 Belongs to the rightmost classical field
%XX Is the range of membership function , For details, please refer to fuzzy comprehensive evaluation based on rough set , One has four membership functions
% The first two numbers , Determine the membership function of a descending segment , It's divided into three parts
% In the future 4 The upper number is a group , Determine a trapezoidal membership function , Divided into five sections
% The last two are a separate group , The membership function of a rising segment is divided into three segments
% Each line below has 12 Number , Its share 4 Level , Count the number of points in the division 2 4 4 2 The sum is 12
% That is to say, it forms four levels
%XX It is also the core data of calculation
xx=[70 90 70 90 110 130 110 130 170 190 170 190
45 35 45 35 30 20 30 20 17 10 17 10
1.5 2.5 1.5 2.5 3 4 3 4 4.5 5.5 4.5 5.5
0.25 0.35 0.25 0.35 0.45 0.55 0.45 0.55 0.65 0.75 0.65 0.75];
%pp1 The bigger the index is , The higher the rank , Or the bigger , The smaller the grade is
%0 The larger the index value , The higher the level
%1 The larger the index value , The lower the grade
% This point should be strictly implemented ,XX(i,:), From small to large 0,XX(i,:) From big to small 1,
% If the above XX The order of line is reversed , Then for pp1=[1 0 1 1 ]
pp1=[0 1 0 0];
% Parameters of each tunnel section to be evaluated
yy=[200 8 6 0.8
200 9.5 6 0.8
200 11 6 0.8
200 12.5 6 0.8
200 14 6 0.8
200 15.5 6 0.8
200 17 6 0.8
200 18.5 6 0.8
200 20 6 0.8
200 21.5 6 0.8
200 23 6 0.8
200 24.5 6 0.8
200 26 6 0.8
200 27.5 6 0.8
200 29 6 0.8
200 30.5 6 0.8
200 32 6 0.8
200 33.5 6 0.8
200 35 6 0.8
200 36.5 6 0.8
200 38 6 0.8
200 39.5 6 0.8
200 41 6 0.8
200 42.5 6 0.8
200 44 6 0.8
200 45.5 6 0.8
200 47 6 0.8
200 48.5 6 0.8
200 50 6 0.8
];
% The membership function form of the ascending and descending segments
% Note that the form of membership function is the same as that in the paper , Otherwise, change the basic parts of the program
% there a It refers to the middle point of the interval ,b Refers to the width of the interval
f1=inline('0.5-0.5*sin((x-a)*pi/b)','a','b','x');
f2=inline('0.5+0.5*sin((x-a)*pi/b)','a','b','x');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Find the membership degree of each index for the first grade
for i=1:M,
for k=1:R,
j=1;
if pp1(k)==0 % First, the bigger , The higher the level is
if yy(i,k)<xx(k,j)
yy1(i,k,j)=1;
elseif yy(i,k)<=xx(k,j+1)
yy1(i,k,j)=f1(0.5*(xx(k,j)+xx(k,j+1)),abs(xx(k,j)-xx(k,j+1)),yy(i,k)) ;
else yy1(i,k,j)=0;
end
% The smaller the evaluation , The higher the level is
% Compared with one, greater than and less than are interchangeable , function f1 and f2 Also exchange
elseif yy(i,k)>xx(k,j)
yy1(i,k,j)=1;
elseif yy(i,k)>=xx(k,j+1)
yy1(i,k,j)=f2(0.5*(xx(k,j)+xx(k,j+1)),abs(xx(k,j)-xx(k,j+1)),yy(i,k));
else yy1(i,k,j)=0;
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Calculate the membership degree of each index for the last grade
for i=1:M,
for k=1:R,
j=L;
if pp1(k)==0 % First, the bigger , The higher the level is
if yy(i,k)<xx(k,j*4-5)
yy1(i,k,j)=0;
elseif yy(i,k)<=xx(k,j*4-4)
yy1(i,k,j)=f2(0.5*(xx(k,j*4-5)+xx(k,j*4-4)),abs(xx(k,j*4-5)-xx(k,j*4-4)),yy(i,k));
else yy1(i,k,j)=1;
end
% The smaller the evaluation , The higher the level is
% Compared with one, greater than and less than are interchangeable , function f1 and f2 Also exchange
elseif yy(i,k)>xx(k,j*4-5)
yy1(i,k,j)=0;
elseif yy(i,k)>=xx(k,j*4-4)
yy1(i,k,j)=f1(0.5*(xx(k,j*4-5)+xx(k,j*4-4)),abs(xx(k,j*4-5)-xx(k,j*4-4)),yy(i,k)) ;
else yy1(i,k,j)=1;
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Find the membership degree of each index for the middle levels
for i=1:M,
for k=1:R,
for j=2:L-1;
if pp1(k)==0 % First, the bigger , The higher the level is
if yy(i,k)<xx(k,j*4-5)
yy1(i,k,j)=0;
elseif yy(i,k)<=xx(k,j*4-4)
yy1(i,k,j)=f2(0.5*(xx(k,j*4-5)+xx(k,j*4-4)),abs(xx(k,j*4-5)-xx(k,j*4-4)),yy(i,k));
elseif yy(i,k)<=xx(k,j*4-3)
yy1(i,k,j)=1;
elseif yy(i,k)<=xx(k,j*4-2)
yy1(i,k,j)=f1(0.5*(xx(k,j*4-3)+xx(k,j*4-2)),abs(xx(k,j*4-3)-xx(k,j*4-2)),yy(i,k)) ;
else yy1(i,k,j)=0;
end
% The smaller the evaluation , The higher the level is
% Compared with one, greater than and less than are interchangeable , function f1 and f2 Also exchange
elseif yy(i,k)>xx(k,j*4-5)
yy1(i,k,j)=0;
elseif yy(i,k)>=xx(k,j*4-4)
yy1(i,k,j)=f1(0.5*(xx(k,j*4-5)+xx(k,j*4-4)),abs(xx(k,j*4-5)-xx(k,j*4-4)),yy(i,k));
elseif yy(i,k)>=xx(k,j*4-3)
yy1(i,k,j)=1;
elseif yy(i,k)>=xx(k,j*4-2)
yy1(i,k,j)=f2(0.5*(xx(k,j*4-3)+xx(k,j*4-2)),abs(xx(k,j*4-3)-xx(k,j*4-2)),yy(i,k)) ;
else yy1(i,k,j)=0;
end
end
end
end
% % Multiply by , The membership degree multiplies the weight, and the membership degree of each hole section to each grade , Taking the maximum
%dot Function is inner product function , Sum the two vectors after their corresponding components are equal
for i=1:M,
for j=1:L,
qdh(i,j)=dot(yy1(i,:,j),w);
end
end
% Multiply the membership by the grade value , Determine level
% %qdh For the evaluation results , Take one of the biggest , Which level does it belong to
% qdh1, Rank value
for i=1:M,
for j=1:L,
[maxlevel(i),qdh1(i)]=max(qdh(i,:));
end
disp([' sample ',num2str(i),' The corresponding classification is :',num2str(qdh1(i))]);
end
figure(1)
plot(qdh1(1:29),'-*');
title(' Fuzzy comprehensive evaluation prediction ','fontsize',12)
xlabel(' sample ','fontsize',12)
ylabel(' Category ','fontsize',12)
toc
Two . Simulation results
sample 1 The corresponding classification is :4
sample 2 The corresponding classification is :4
sample 3 The corresponding classification is :4
sample 4 The corresponding classification is :4
sample 5 The corresponding classification is :4
sample 6 The corresponding classification is :3
sample 7 The corresponding classification is :3
sample 8 The corresponding classification is :3
sample 9 The corresponding classification is :3
sample 10 The corresponding classification is :3
sample 11 The corresponding classification is :3
sample 12 The corresponding classification is :3
sample 13 The corresponding classification is :2
sample 14 The corresponding classification is :2
sample 15 The corresponding classification is :2
sample 16 The corresponding classification is :2
sample 17 The corresponding classification is :2
sample 18 The corresponding classification is :2
sample 19 The corresponding classification is :2
sample 20 The corresponding classification is :2
sample 21 The corresponding classification is :2
sample 22 The corresponding classification is :2
sample 23 The corresponding classification is :1
sample 24 The corresponding classification is :1
sample 25 The corresponding classification is :1
sample 26 The corresponding classification is :1
sample 27 The corresponding classification is :1
sample 28 The corresponding classification is :1
sample 29 The corresponding classification is :1
Time has passed 0.075994 second .
3、 ... and . Summary
Fuzzy comprehensive evaluation method (fuzzy comprehensive evaluation method) It is one of the most basic mathematical methods in Fuzzy Mathematics , This method uses membership degree to describe fuzzy bounds . Due to the complexity of evaluation factors 、 The hierarchy of the evaluation object 、 The fuzziness in the evaluation criteria and the fuzziness or uncertainty of the evaluation influencing factors 、 A series of problems such as difficulty in quantifying qualitative indicators , It makes it difficult for people to use absolute “ either this or that ” To accurately describe the objective reality , There are often “ This is the same as that ” Fuzzy phenomenon of , Its description is often expressed in natural language , The biggest feature of natural language is its fuzziness , And this kind of fuzziness is difficult to be measured uniformly by classical mathematical models . therefore , Fuzzy comprehensive evaluation method based on fuzzy set , Comprehensively evaluate the subordinate level of the evaluated things from multiple indicators , It divides the change range of the judged things , On the one hand, we can take into account the hierarchy of objects , Make the evaluation criteria 、 The fuzziness of influencing factors is reflected ; On the other hand, we can give full play to people's experience in evaluation , Make the evaluation results more objective , In line with the actual situation . Fuzzy comprehensive evaluation can combine qualitative and quantitative factors , Expand the amount of information , So that the number of evaluations can be improved , The evaluation conclusion is credible .
There are many traditional comprehensive evaluation methods , It is also widely used , But there is no way to suit all kinds of places , Solve all the problems , Each method has its focus and main application fields . If we want to solve new problems in new fields , Fuzzy synthesis method is obviously more suitable . Fuzzy evaluation method is based on Fuzzy Mathematics . Fuzzy mathematics was born in 1965 year , His founder, American automatic control expert L.A.Zadeh.20 century 80 Late S , Japan applies fuzzy technology to robots 、 process control 、 Subway locomotive 、 traffic control 、 Troubleshooting 、 Medical diagnosis 、 Voice recognition 、 The image processing 、 Market prediction and many other fields . The application of fuzzy theory and fuzzy method in Japan and its huge market prospect , It has shocked the Western business community , It has also been widely recognized in academia . Domestic research on fuzzy mathematics and fuzzy comprehensive evaluation method started relatively late , But in recent years, in various fields ( Such as medicine 、 The construction industry 、 Environmental quality supervision 、 Water conservancy, etc ) The application of has also shown initial results . Learn one every day MATLAB Little knowledge , Let's learn and make progress together !
边栏推荐
- [trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
- 剑指 Offer 05. 替换空格
- Negative pressure generation of buck-boost circuit
- 關於線性穩壓器的五個設計細節
- Google sitemap files for rails Projects - Google sitemap files for rails projects
- Explain task scheduling based on Cortex-M3 in detail (Part 2)
- NTC thermistor application - temperature measurement
- [nas1] (2021cvpr) attentivenas: improving neural architecture search via attentive sampling (unfinished)
- Infected Tree(树形dp)
- Relationship between line voltage and phase voltage, line current and phase current
猜你喜欢
More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
[trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication
Semiconductor devices (III) FET
Summary of SIM card circuit knowledge
【三层架构及JDBC总结】
Design a clock frequency division circuit that can be switched arbitrarily
How to copy formatted notepad++ text?
Hardware 3 -- function of voltage follower
H264 (I) i/p/b frame gop/idr/ and other parameters
UE pixel stream, come to a "diet pill"!
随机推荐
Example 007: copy data from one list to another list.
Step motor generates S-curve upper computer
Circleq of linked list
Working principle and type selection of common mode inductor
Hardware 1 -- relationship between gain and magnification
Use indent to format code
List of linked lists
Example 005: three numbers sorting input three integers x, y, Z, please output these three numbers from small to large.
Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off
Detailed summary of FIO test hard disk performance parameters and examples (with source code)
【云原生 | 从零开始学Kubernetes】三、Kubernetes集群管理工具kubectl
Take you to understand the working principle of lithium battery protection board
Semiconductor devices (I) PN junction
關於線性穩壓器的五個設計細節
实例008:九九乘法表
Example 004: for the day of the day, enter a day of a month of a year to judge the day of the year?
STM32 outputs 1PPS with adjustable phase
Weidongshan Internet of things learning lesson 1
第十八章 使用工作队列管理器(一)
Infected Tree(树形dp)