Changeset 694 for library/utia_legacy
- Timestamp:
- 11/02/09 18:02:27 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/utia_legacy/ticket_12/test_str.m
r647 r694 3 3 % run just time-to-time - do not forget to copy resulting values to 4 4 % test_arx_straux.cpp!!! 5 if 0 6 A=rand(3) 7 B=rand(3) 5 6 7 if 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 8 17 % when run, copy output to the else section 9 18 else 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'); 17 20 end 18 21 19 [L0,D0]=ldform(A,eye(3)); 20 [L1,D1]=ldform(A+B,eye(3)); 22 for 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))); 21 25 22 % structure estimation - copied form facstr23 belief = 2; % default belief24 nbest = 1; % nbest: how many regressors are returned25 nrep = 5; % nrep: number of random repetions of structure estimation26 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; 28 32 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; 38 end 39 40 save str_aux S