📄 fuz_id.m
字号:
function [centers,bases,par,bias]=fuz_id(comp,training_set)%FUZ_ID Identification of the parameters of a Fuzzy Model%% [centers,bases,par,bias]=fuz_id(comp,training_set)%% centers[no_rules,no_var]% bases[no_rules,no_var]% par[no_rules,no_par] where no_par=1 if model='constant'% and no_par=no_var+1 if model='linear'% bias[1,1]% % comp[1,1] is the complexity of the model being identified% training_set[no_data,no_var+1] the first no_var columns are the% inputs, the last one is the output%% The following global variable are required: % memb_fun: 'gaussian'/'triangular' % arch: 'weigthed'/'comb' % format_out: 'linear'/'constant' % init: 'k_mean'/'hfc'% fid_h%______________________________________________________10 April 1996____global memb_funglobal archglobal format_outglobal initglobal fid_h%Initialization:[centers,bases]=eval([init '(comp,training_set)']);%Optimization:termination=0;old_SSE=1e+10;k=0.005;[no_data,c]=size(training_set);in_trn=training_set(:,1:c-1);out_trn=training_set(:,c);while (termination <2) % INVERSION to determine the parameters of the CONSEQUENTS if strcmp(format_out,'constant') [SSE,new_par,bias]=inv_co(in_trn,centers,bases,out_trn); end if strcmp(format_out,'linear') [SSE,new_par,bias]=inv_li(in_trn,centers,bases,out_trn); end if (SSE/old_SSE >1-k) termination=termination+1; end if isnan(SSE) break; end par=new_par; fprintf(fid_h,'\t\t\t\tConsequents optimization. SSE=%g\n',SSE); old_SSE=SSE; % LEVENBERG-MARQUARDT to determine the CENTERS and the BASES [centers,bases]=leve_mao(in_trn,centers,bases,par,bias,out_trn);end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -