|
Revision 871, 0.6 kB
(checked in by mido, 16 years ago)
|
|
adaptation of /applications to new version of LOG_LEVEL
also, a cosmetic change made in enumerations: logub -> logubound, loglb -> loglbound
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | % load data created by the pdfDS_example |
|---|
| 2 | load pdfds_results |
|---|
| 3 | |
|---|
| 4 | DS.class = 'MemDS'; |
|---|
| 5 | DS.Data = Data; |
|---|
| 6 | DS.drv = drv; |
|---|
| 7 | |
|---|
| 8 | %%%%%% ARX estimator |
|---|
| 9 | |
|---|
| 10 | A1.class = 'ARX'; |
|---|
| 11 | A1.rv = y; |
|---|
| 12 | A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y} |
|---|
| 13 | A1.log_level ='logbounds,logevidence'; |
|---|
| 14 | |
|---|
| 15 | A2=A1; |
|---|
| 16 | A2.constant = 0; |
|---|
| 17 | |
|---|
| 18 | A3=A2; |
|---|
| 19 | A3.frg = 0.95; |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | %name them |
|---|
| 23 | A1.name='A1'; |
|---|
| 24 | A2.name='A2'; |
|---|
| 25 | A2.rv_param = RV({'a2th', 'r'},[2,1],[0,0]); |
|---|
| 26 | A3.name='A3'; |
|---|
| 27 | A3.rv_param = RV({'a3th', 'r'},[2,1],[0,0]); |
|---|
| 28 | |
|---|
| 29 | M=estimator(DS,{A1,A2,A3}); |
|---|
| 30 | |
|---|
| 31 | %%%% Process results |
|---|
| 32 | lls = [sum(M.A1_ll_) sum(M.A2_ll_) sum(M.A3_ll_)] |
|---|
| 33 | |
|---|
| 34 | ells=exp(lls-max(lls)); |
|---|
| 35 | Model_probabilities=ells/sum(ells) |
|---|