corminen.m
来自「FISMAT accommodates different arithmetic」· M 代码 · 共 58 行
M
58 行
function O=corminen(FAMbank,BeA,BdeA,L)% O=corminen(FAMbank,BeA,BdeA,L) %% Correlation-Minimum Encoding. Kosko (1992)%% Correlation-minimum encoding :% Defining pointwise the fuzzy Hebb matrix hebbbM by the minimum of the % "signals" BdeA(i) and BeA(j), an encoding scheme we shall call % correlation-minimum encoding. Fuzzy correlation constructs fuzzy matrices. % Correlation-minimum encoding produces a matrix of clipped BeA sets, while% the correlation-product encoding produces a matrix of scaled BeA sets. % In practise we sidestep this large numerical matrix with a virtual % representation scheme. In place of the matrix the user encodes the fuzzy-% set associations as linguistic entries in a FAM-bank linguistic matrix.%% L is the library of fuzzy sets for the output universe of discourse Y.% The universe of discourse is the most right collumn of L.% The system sums all O(i) to form the combined output fuzzy set O.% O is a row vector (length n = dimension of L).% BdeA is associated with the vertical line of the rule bank.% BeA is associated with the horizontal line of the rule bank.%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 28-Feb-1994 % BeA and BdeA are the product of the bit vector B for each input and the % matrix A which contains the library of fuzzy sets.% Correlation minimum encoding => fuzzy Hebb matrix :A=BdeA';n=length(A); p=length(BeA); hebbM=zeros(n,p);for i=1:n, hebbM(i,:)=min((ones(1,p).*A(i)),BeA);end;% The hebb matrix contains now the w(i), which determines the degree, to % which the corresponding rule activates the consequent fuzzy set. % For the correllation-minimum encoding we, we clip the consequent fuzzy set % L(i) in the library of fuzzy-set values to the w(i) degree with pointwise% minimum. mOi(y)=min(w(i),mLi(Y)).% The library L is already rotated (rot90() and flipud()). % That means in each collumn one set. The most left represents Large Neg.% From mLi(ymin) at the top to mLi(ymax) at the bottom. [n,N]=size(L); % n=dimension of L. N number of library sets.[i,j]=find(FAMbank); % "coordinates" of existing rules.Oi=ones(length(i),n);for r=1:length(i), Oi(r,:)=min(hebbM(i(r),j(r)).*Oi(r,:),(L(:,FAMbank(i(r),j(r))))');end;O=ones(1,length(i))*Oi; % O is a row vector with n elements.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?