Show
Ignore:
Timestamp:
06/24/09 13:38:47 (16 years ago)
Author:
mido
Message:

UI documentation almost finished; UIException redesigned and used instead of UI::ui_error function

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/html/arx_ui.html

    r385 r396  
    55<link href="doxygen.css" rel="stylesheet" type="text/css"> 
    66</head><body> 
    7 <!-- Generated by Doxygen 1.5.8 --> 
     7<!-- Generated by Doxygen 1.5.9 --> 
    88<script type="text/javascript"> 
    99<!-- 
     
    6262<div class="contents"> 
    6363<h1><a class="anchor" name="arx_ui">Running experiment <code>estimator</code> with ARX data fields </a></h1>The experiment estimator::cpp can be run either on command line, or as a mex file in Matlab.<h2><a class="anchor" name="cmd"> 
    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> 
     64Command Line</a></h2> 
     65In 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> 
    11366The structure is interpreted by application <code>estimator</code>, which looks for fields: <dl> 
    11467<dt>system</dt> 
     
    12578Matlab mex file</a></h2> 
    12679The matlab mex file can be run with exactly the same configuration as above. However, when we wish to see the results in Matlab, we may wish to change the logger object to <code>type="mexlog"</code> which will store the results in a matlab structure.<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> 
     80The exact configuration file may look as follows: <div class="fragment"><pre class="fragment"></pre></div><p> 
    15781The resulting structure can be displayed using matlab script arx_test_disp.m, typically producing the following results: <div align="center"> 
    15882<img src="arx_ui_mex.png" alt="arx_ui_mex.png"> 
    15983</div> 
    16084  </div> 
    161 <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 14:13:28 2009 for mixpp by&nbsp; 
     85<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 24 13:35:47 2009 for mixpp by&nbsp; 
    16286<a href="http://www.doxygen.org/index.html"> 
    163 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> 
     87<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> 
    16488</body> 
    16589</html>