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

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 
1clear all
2% load data created by the pdfDS_example
3load pdfds_results
4
5DS.class   = 'MemDS';
6DS.Data    = Data;
7DS.drv     = drv;
8
9%%%%%% ARX estimator
10
11A1.class = 'ARX';
12A1.rv = y;
13A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y}
14A1.log_level ='logbounds,logevidence';
15
16A2=A1;
17A2.constant = 0;
18
19A3=A2;
20A3.frg = 0.95;
21
22
23%name them
24A1.name='A1';
25A2.name='A2';
26A2.rv_param = RV({'a2th', 'r'},[2,1],[0,0]);
27A3.name='A3';
28A3.rv_param = RV({'a3th', 'r'},[2,1],[0,0]);
29
30M=estimator(DS,{A1,A2,A3});
31
32%%%% Process results
33lls = [sum(M.A1_evidence_) sum(M.A2_evidence_) sum(M.A3_evidence_)]
34
35ells=exp(lls-max(lls));
36Model_probabilities=ells/sum(ells)
Note: See TracBrowser for help on using the browser.