Revision 631, 0.6 kB
(checked in by smidl, 15 years ago)
|
doc estimation + ARX corrections
|
Line | |
---|
1 | % load data created by the MpdfDS_example |
---|
2 | load mpdfds_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.options ='logbounds,logll'; |
---|
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.A1ll) sum(M.A2ll) sum(M.A3ll)] |
---|
33 | |
---|
34 | ells=exp(lls-max(lls)); |
---|
35 | Model_probabilities=ells/sum(ells) |
---|