root/applications/bdmtoolbox/tutorial/userguide/arx_selection_example.m @ 706

Revision 706, 0.6 kB (checked in by smidl, 15 years ago)

eol-native

  • Property svn:eol-style set to native
Line 
1% load data created by the MpdfDS_example
2load pdfds_results
3
4DS.class   = 'MemDS';
5DS.Data    = Data;
6DS.drv     = drv;
7
8%%%%%% ARX estimator
9
10A1.class = 'ARX';
11A1.rv = y;
12A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y}
13A1.options ='logbounds,logll';
14
15A2=A1;
16A2.constant = 0;
17
18A3=A2;
19A3.frg = 0.95;
20
21
22%name them
23A1.name='A1';
24A2.name='A2';
25A2.rv_param = RV({'a2th', 'r'},[2,1],[0,0]);
26A3.name='A3';
27A3.rv_param = RV({'a3th', 'r'},[2,1],[0,0]);
28
29M=estimator(DS,{A1,A2,A3});
30
31%%%% Process results
32lls = [sum(M.A1_ll_ll) sum(M.A2_ll_ll) sum(M.A3_ll_ll)]
33
34ells=exp(lls-max(lls));
35Model_probabilities=ells/sum(ells)
Note: See TracBrowser for help on using the browser.