64 | | Command-line usage</a></h2> |
65 | | In order to use it for estimation of an ARX model, we can define the following <a class="el" href="ui.html">User Infos and their use</a> structure: <div class="fragment"><pre class="fragment"><span class="comment">//Data generating system</span> |
66 | | system = { |
67 | | <span class="keyword">class </span>= "ArxDS"; |
68 | | y = {<span class="keyword">class</span>=<span class="stringliteral">"RV"</span>; names=(<span class="stringliteral">"y"</span>, <span class="stringliteral">"u"</span>);}; |
69 | | u = {<span class="keyword">class</span>=<span class="stringliteral">"RV"</span>; names=(); }; |
70 | | rgr = {<span class="keyword">class</span>=<span class="stringliteral">"RV"</span>; |
71 | | names = (<span class="stringliteral">"y"</span>,<span class="stringliteral">"y"</span>,<span class="stringliteral">"y"</span>,<span class="stringliteral">"u"</span>); |
72 | | times = [-1, -2, -3, -1]; |
73 | | }; |
74 | | <span class="comment">//AR parameters</span> |
75 | | theta = (2,4,[0.8, -0.3, 0.4, 1.0, |
76 | | 0.0, 0.0, 0.0, 0.0]); |
77 | | <span class="comment">// offset</span> |
78 | | offset = [0.0, 0.0]; |
79 | | <span class="comment">//variance</span> |
80 | | r = (2,2,[0.1, 0.0, |
81 | | 0.0, 1.0] ); |
82 | | <span class="comment">// log also theta</span> |
83 | | opt=<span class="stringliteral">"L_theta"</span>; |
84 | | }; |
85 | | |
86 | | <span class="comment">//store results</span> |
87 | | logger = { |
88 | | <span class="keyword">class</span>= <span class="stringliteral">"dirfilelog"</span>; |
89 | | dirname = <span class="stringliteral">"exp/arx_ui"</span>; |
90 | | maxlen = 1000; <span class="comment">//</span> |
91 | | }; |
92 | | |
93 | | <span class="comment">//estimation</span> |
94 | | estimator = { |
95 | | <span class="keyword">class </span>= "ARX"; |
96 | | y = {<span class="keyword">class</span>=<span class="stringliteral">"RV"</span>; names=(<span class="stringliteral">"y"</span>); }; |
97 | | rgr = {<span class="keyword">class</span>=<span class="stringliteral">"RV"</span>; |
98 | | names = (<span class="stringliteral">"y"</span>,<span class="stringliteral">"y"</span>,<span class="stringliteral">"y"</span>,<span class="stringliteral">"u"</span>); |
99 | | times = [-1, -2, -3, -1]; |
100 | | }; |
101 | | |
102 | | <span class="comment">//optional fields</span> |
103 | | dV0 = [1e-3, 1e-5, 1e-5, 1e-5, 1e-5]; <span class="comment">//default: 1e-3 for y, 1e-5 for rgr</span> |
104 | | nu0 = 8.; <span class="comment">//default: rgrlen + 2</span> |
105 | | frg = 1.0; <span class="comment">// forgetting, default frg=1.0</span> |
106 | | }; |
107 | | |
108 | | <span class="comment">//experiment description</span> |
109 | | experiment:{ |
110 | | ndat = 9000; |
111 | | }; |
112 | | </pre></div><p> |
| 64 | Command Line</a></h2> |
| 65 | In order to use it for estimation of an ARX model, we can define the following <a class="el" href="ui.html">User Infos and their use</a> structure: <div class="fragment"><pre class="fragment"></pre></div><p> |
127 | | The exact configuration file may look as follows: <div class="fragment"><pre class="fragment"><span class="comment">//Data generating system</span> |
128 | | system = { type=<span class="stringliteral">"external"</span>; filename=<span class="stringliteral">"arx_test.cfg"</span>; path=<span class="stringliteral">"system"</span>;}; |
129 | | |
130 | | <span class="comment">//store results</span> |
131 | | logger = { |
132 | | type= <span class="stringliteral">"mexlog"</span>; |
133 | | maxlen = 90; <span class="comment">//</span> |
134 | | <span class="comment">//dirname = "exp/ax";</span> |
135 | | }; |
136 | | |
137 | | <span class="comment">//estimation</span> |
138 | | estimator = { |
139 | | type = <span class="stringliteral">"ARX"</span>; |
140 | | y = {type=<span class="stringliteral">"RV"</span>; names=(<span class="stringliteral">"y"</span>); }; |
141 | | rgr = {type=<span class="stringliteral">"RV"</span>; |
142 | | names = (<span class="stringliteral">"y"</span>,<span class="stringliteral">"y"</span>,<span class="stringliteral">"y"</span>,<span class="stringliteral">"u"</span>); |
143 | | times = [-1, -2, -3, -1]; |
144 | | }; |
145 | | |
146 | | <span class="comment">//optional fields</span> |
147 | | dV0 = [1e-3, 1e-5, 1e-5, 1e-5, 1e-5]; <span class="comment">//default: 1e-3 for y, 1e-5 for rgr</span> |
148 | | <span class="comment">//nu0 = 8.; //default: rgrlen + 2</span> |
149 | | frg = .9991; <span class="comment">// forgetting, default frg=1.0</span> |
150 | | }; |
151 | | |
152 | | <span class="comment">//experiment description</span> |
153 | | experiment:{ |
154 | | ndat = 90; |
155 | | }; |
156 | | </pre></div><p> |
| 80 | The exact configuration file may look as follows: <div class="fragment"><pre class="fragment"></pre></div><p> |