Changeset 694

Show
Ignore:
Timestamp:
11/02/09 18:02:27 (14 years ago)
Author:
smidl
Message:

extensive testing of str_aux

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/utia_legacy/ticket_12/test_str.m

    r647 r694  
    33% run just time-to-time - do not forget to copy resulting values to 
    44% test_arx_straux.cpp!!! 
    5 if 0 
    6     A=rand(3) 
    7     B=rand(3) 
     5 
     6 
     7if 1 
     8        S={}; 
     9        i=1; 
     10        for dim=[3 5 10 20] 
     11            A=rand(dim); 
     12        B=rand(dim); 
     13                S{i}.A = A; 
     14                S{i}.B = B; 
     15                i=i+1; 
     16        end 
    817    % when run, copy output to the else section 
    918else 
    10     A=[   0.8147    0.9134    0.2785; 
    11     0.9058    0.6324    0.5469; 
    12     0.1270    0.0975    0.9575]; 
    13  
    14     B=[0.9649    0.9572    0.1419; 
    15     0.1576    0.4854    0.4218; 
    16     0.9706    0.8003    0.9157]; 
     19        S = load('str_aux'); 
    1720end 
    1821 
    19 [L0,D0]=ldform(A,eye(3)); 
    20 [L1,D1]=ldform(A+B,eye(3)); 
     22for i=1:length(S) 
     23  [L0,D0]=ldform(S{i}.A, eye(size(S{i}.A,1))); 
     24  [L1,D1]=ldform(S{i}.A+S{i}.B, eye(size(S{i}.A,1))); 
    2125 
    22 % structure estimation - copied form facstr 
    23 belief = 2;           % default belief 
    24 nbest = 1;           % nbest: how many regressors are returned 
    25 nrep = 5;         % nrep: number of random repetions of structure estimation 
    26 lambda   = 0.9;  
    27 k=2; 
     26  % structure estimation - copied form facstr 
     27  belief = 2;           % default belief 
     28  nbest = 1;           % nbest: how many regressors are returned 
     29  nrep = 5;         % nrep: number of random repetions of structure estimation 
     30  lambda   = 0.9;  
     31  k=2; 
    2832 
    29 % [strout, rgrsout, statistics] =  
    30 %          straux1(L, d, nu, L0, d0, nu0, belief, nbest, max_nrep, lambda, 
    31 %          order_k); 
    32 [o1,o2,o3]=straux1(L1,diag(D1),20, L0, diag(D0), 10,  belief, nbest, nrep, lambda, k); 
     33  % [strout, rgrsout, statistics] =  
     34  %          straux1(L, d, nu, L0, d0, nu0, belief, nbest, max_nrep, lambda, 
     35  %          order_k); 
     36  [o1,o2,o3]=straux1(L1,diag(D1),20, L0, diag(D0), 10,  belief, nbest, nrep, lambda, k); 
     37  S{i}.o1= o1; 
     38end 
     39 
     40save str_aux S