34 | | <li>Pure C++, as it is used in unit testing of the class arx, <a class="el" href="arx__test_8cpp.html">arx_test.cpp</a></li><li>C++ application with UI configuration file, arx_test_ui</li><li>Matlab interface, arx_matlab </li></ul> |
35 | | </div> |
36 | | <hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 23:33:57 2009 for mixpp by |
| 36 | <li>Pure C++, see below, or unit testing file of class ARX, <a class="el" href="arx__test_8cpp.html">arx_test.cpp</a>.</li><li>C++ application <code>estimator</code> with UI configuration file, <a class="el" href="arx_ui.html">Running experiment <code>estimator</code> with ARX data fields</a>.</li><li>Matlab .mex file <code>estimator</code> with UI configuration file, <a class="el" href="arx_ui.html">Running experiment <code>estimator</code> with ARX data fields</a>.</li></ul> |
| 37 | <p> |
| 38 | The easiest way how to use class ARX is: <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="arx_8h.html" title="Bayesian Filtering for generalized autoregressive (ARX) model.">estim/arx.h</a>></span> |
| 39 | <span class="keyword">using namespace </span>bdm; |
| 40 | |
| 41 | <span class="comment">// estimation of AR(0) model</span> |
| 42 | <span class="keywordtype">int</span> main() { |
| 43 | <span class="comment">//prior </span> |
| 44 | mat V0 = 0.00001*eye(2); V0(0,0)= 0.1; <span class="comment">//</span> |
| 45 | ARX Ar; |
| 46 | Ar.set_statistics(1, V0); <span class="comment">//nu is default (set to have finite moments)</span> |
| 47 | <span class="comment">// forgetting is default: 1.0</span> |
| 48 | mat Data = concat_vertical( randn(1,100), ones(1,100) ); |
| 49 | Ar.bayesB( Data); |
| 50 | |
| 51 | cout << <span class="stringliteral">"Expected value of Theta is: "</span> << Ar.posterior().mean() <<endl; |
| 52 | } |
| 53 | </pre></div><p> |
| 54 | Here, it is assumed that </div> |
| 55 | <hr size="1"><address style="text-align: right;"><small>Generated on Sun Feb 15 21:43:51 2009 for mixpp by |