Home > subfunctions > ccl_learna_sa_nhat.m

ccl_learna_sa_nhat

PURPOSE ^

[model, stats] = ccl_learna_sa_nhat (V, Un, model, search)

SYNOPSIS ^

function [model, stats] = ccl_learna_sa_nhat (V, Un, model, search)

DESCRIPTION ^

 [model, stats] = ccl_learna_sa_nhat (V, Un, model, search)

 Search the s-th constrain which orthogal to the previous ones

 Input:
   V                                   Un*Un
   Un                                  Null space component observations
   model                               Model parameters
   search                              Searching related parameters

 Output:
   model                               Returned learnt alpha and performance
   stats                               Mean square error

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [model, stats] = ccl_learna_sa_nhat (V, Un, model, search)
0002 % [model, stats] = ccl_learna_sa_nhat (V, Un, model, search)
0003 %
0004 % Search the s-th constrain which orthogal to the previous ones
0005 %
0006 % Input:
0007 %   V                                   Un*Un
0008 %   Un                                  Null space component observations
0009 %   model                               Model parameters
0010 %   search                              Searching related parameters
0011 %
0012 % Output:
0013 %   model                               Returned learnt alpha and performance
0014 %   stats                               Mean square error
0015 
0016 % for alpha_id > 1, check if alpha is orthogonal to the existing ones
0017 for i = 1:search.dim_s
0018     abs_dot_product = abs ( model.alpha * search.alpha{i}' )  ; % dot product between this alpha and the previous one's
0019     if sum(abs_dot_product > 0.001) > 0 % ignore alpha that is not orthogonal to any one of them
0020         stats.umse(i) = 1000000000 ;
0021     else
0022         alpha         = [model.alpha; search.alpha{i}] ;
0023         AA            = pinv(alpha)*alpha ;
0024         stats.umse(i) = sum ( V*AA(:) ) ;
0025     end
0026 end
0027 [min_err, min_ind]  = min(stats.umse) ;
0028 model.theta         = [ model.theta ; search.theta{min_ind} ] ;
0029 model.alpha         = [ model.alpha ; search.alpha{min_ind} ] ;
0030 model.P             = search.I_u - pinv(model.alpha) * model.alpha ;
0031 model.variance      = sum(var( model.P*Un, 0, 2)) ;
0032 model.umse_j        = stats.umse(min_ind) / search.dim_n ;
0033 model.nmse_j        = model.umse_j        / model.variance ;
0034 end

Generated on Mon 01-Jan-2018 15:49:39 by m2html © 2005