Revision 934, 0.6 kB
(checked in by smidl, 14 years ago)
|
use clear all + new mex
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | clear all |
---|
2 | % load data created by the pdfDS_example |
---|
3 | load pdfds_results |
---|
4 | |
---|
5 | DS.class = 'MemDS'; |
---|
6 | DS.Data = Data; |
---|
7 | DS.drv = drv; |
---|
8 | |
---|
9 | %%%%%% ARX estimator |
---|
10 | |
---|
11 | A1.class = 'ARX'; |
---|
12 | A1.rv = y; |
---|
13 | A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y} |
---|
14 | A1.log_level ='logbounds,logevidence'; |
---|
15 | |
---|
16 | A2=A1; |
---|
17 | A2.constant = 0; |
---|
18 | |
---|
19 | A3=A2; |
---|
20 | A3.frg = 0.95; |
---|
21 | |
---|
22 | |
---|
23 | %name them |
---|
24 | A1.name='A1'; |
---|
25 | A2.name='A2'; |
---|
26 | A2.rv_param = RV({'a2th', 'r'},[2,1],[0,0]); |
---|
27 | A3.name='A3'; |
---|
28 | A3.rv_param = RV({'a3th', 'r'},[2,1],[0,0]); |
---|
29 | |
---|
30 | M=estimator(DS,{A1,A2,A3}); |
---|
31 | |
---|
32 | %%%% Process results |
---|
33 | lls = [sum(M.A1_evidence_) sum(M.A2_evidence_) sum(M.A3_evidence_)] |
---|
34 | |
---|
35 | ells=exp(lls-max(lls)); |
---|
36 | Model_probabilities=ells/sum(ells) |
---|