www.pudn.com > kicILC-control.rar > offlinetrain_kicr.m, change:2013-04-21,size:974b


function [MSE_validate,A,rbf_var ] = offlinetrain_kicr( x_train,y_train,x_validate,y_validate) 
%DYNAMIC_KICR Summary of this function goes here 
%   Detailed explanation goes here 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
tic 
%高斯核函数rbf寻优 
ii=1; 
can=zeros(2,19); 
%for rbf_var=0.05:0.05:1  %nonlinear demeo  
for rbf_var=10:20:400 
   [ y_validate_predict] = kicr( x_train,y_train,x_validate,rbf_var);   
    can(1,ii)=rbf_var; 
    can(2,ii)=norm(y_validate_predict-y_validate)/sqrt(size(y_validate,2)); 
    ii=ii+1; 
end 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%取mse最小的值时对应的rbf值 
MSE_validate=min(can(2,:)); 
[~,p2]=find(can==MSE_validate); 
rbf_var=can(1,p2); 
 
 fprintf('KICR参数寻优时间: %4f\n',toc); 
figure(1) 
%icaplot('classic',can,2,0,0.1:0.05:1, 'rbf与MSE validate关系图'); 
%plot(0.05:0.05:1,can(2,:));% nonlinear demo  
%plot(10:20:400,can(2,:)) 
 
[ ~,A] = kicr( x_train,y_train,x_validate,rbf_var);   
 
end