⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 update.m

📁 一个关于adaboost算法的matlab程序
💻 M
字号:
function update(rn, C, R, dataset)
% rbf_net_lscr_w_fast.update(rn, C, R[, dataset])
%
% global RBFNET_CG_TEMP_DATA ;

%   G. Raetsch 1.6.98
%   Copyright (c) 1998  GMD Berlin - All rights reserved
%   THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of GMD FIRST Berlin
%   The copyright notice above does not evidence any
%   actual or intended publication of this work.
%   Please see COPYRIGHT.txt for details.

global RBFNET_CG_TEMP_DATA ;
%fprintf(1, '.') ;

MAX_UPDATE_COUNTER = 100 ;

% check for some sleeping conditions ...
check_stop ;

if nargin>3,
  data_w_verify(rn, dataset) ;
end ;

if (~equal(C,RBFNET_CG_TEMP_DATA.C) | ...
    (RBFNET_CG_TEMP_DATA.UpdateCounter>MAX_UPDATE_COUNTER)),
  RBFNET_CG_TEMP_DATA.UpdateCounter=0 ;
  RBFNET_CG_TEMP_DATA.Inp=0 ;
  RBFNET_CG_TEMP_DATA.H=0 ;
else
  if equal(R,RBFNET_CG_TEMP_DATA.R),
    return ;
  end ;
end ;

if nargin<4,
  [RBFNET_CG_TEMP_DATA.H, RBFNET_CG_TEMP_DATA.Inp]= ...
      design_rbf(get_train(rn,1), C, R) ;

  [RBFNET_CG_TEMP_DATA.w,f]= ls_solve_w(RBFNET_CG_TEMP_DATA.H, ...
      get_train(rn,2)', get_distr(rn)', get_lambda(rn)) ;
else
  [RBFNET_CG_TEMP_DATA.H, RBFNET_CG_TEMP_DATA.Inp]= ...
      design_rbf(get_train(dataset,1), C, R) ;

  [RBFNET_CG_TEMP_DATA.w,f]= ls_solve_w(RBFNET_CG_TEMP_DATA.H, ...
      get_train(dataset,2)', get_distr(rn)', get_lambda(rn)) ;
end ;
if f>0,
%  disp('  In order to solve the linear system resulting from the ls-optimization')
  disp([' The regularization constant was increased to \lambda=' num2str(f)]) ;
end ;

RBFNET_CG_TEMP_DATA.train_out=(RBFNET_CG_TEMP_DATA.H*RBFNET_CG_TEMP_DATA.w)' ;
RBFNET_CG_TEMP_DATA.R=R ;
RBFNET_CG_TEMP_DATA.C=C ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -