Show
Ignore:
Timestamp:
09/27/09 00:58:34 (15 years ago)
Author:
smidl
Message:

doc

Files:
1 modified

Legend:

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

    r632 r641  
    138138A3.rv_param = RV({<span class="stringliteral">&apos;a3th&apos;</span>, <span class="charliteral">&apos;r&apos;</span>},[2,1],[0,0]); 
    139139</pre></div><p> First, in order to distinguish the estimators from each other, the estimators were given names. Hence, the results will be logged with prefix given by the name, such as M.A1ll for field <code>ll</code>.</p> 
    140 <p>Second, if the parameters of a ARX model are not specified, they are automatically named <code>theta</code> and <code>r</code>. Howver, in this case, <code>A1</code> and <code>A2</code> differ in size, hence their random variables differ and can not use the same name. Therefore, we have explicitly used another names (RVs) of the parameters.</p> 
     140<p>Second, if the parameters of a ARX model are not specified, they are automatically named <code>theta</code> and <code>r</code>. However, in this case, <code>A1</code> and <code>A2</code> differ in size, hence their random variables differ and can not use the same name. Therefore, we have explicitly used another names (RVs) of the parameters.</p> 
    141141<h2><a class="anchor" id="ug2_bm_composition"> 
    142142Composition of estimators</a></h2> 
     
    147147</p> 
    148148<p> each of these parts is estimated using different approach. The first part is assumed to be analytically tractable, while the second is approximated using empirical approximation.</p> 
    149 <p>The whole algorithm runs by parallel evaluation of many <code>BMs</code> for estimation of <img class="formulaInl" alt="$ x_{1,t}$" src="form_182.png"/>, each of them conditioned on value of a sample of <img class="formulaInl" alt="$x_{2,t}$" src="form_183.png"/>.</p> 
     149<p>The whole algorithm runs by parallel evaluation of many <code>BMs</code> for estimation of <img class="formulaInl" alt="$ x_{1,t}$" src="form_182.png"/>, each of them conditioned on value of a sample of <img class="formulaInl" alt="$ x_{2,t}$" src="form_191.png"/>.</p> 
    150150<p>For example, the forgetting factor, <img class="formulaInl" alt="$ \phi $" src="form_135.png"/> of an ARX model can be considered to be unknown. Then, the whole parameter space is <img class="formulaInl" alt="$ [\theta_t, r_t, \phi_t]$" src="form_184.png"/> decomposed as follows: </p> 
    151151<p class="formulaDsp"> 
    152152<img class="formulaDsp" alt="\[ f(\theta_t, r_t, \phi_t) = f(\theta_t, r_t| \phi_t) f(\phi_t) \]" src="form_185.png"/> 
    153153</p> 
    154 <p> Note that for known trajectory of <img class="formulaInl" alt="$ \phi_t $" src="form_186.png"/> the standard ARX estimator can be used if we find a way how to feed the changing <img class="formulaInl" alt="$ \phi_t $" src="form_186.png"/> into it. This is achieved by a trivial extension using inheritance method <a class="el" href="classbdm_1_1BM.html#a6799f4b16a6a59ed58b1d0d6e17116f4" title="Substitute val for rvc.">bdm::BM::condition()</a>. </p> 
     154<p> Note that for known trajectory of <img class="formulaInl" alt="$ \phi_t $" src="form_186.png"/> the standard ARX estimator can be used if we find a way how to feed the changing <img class="formulaInl" alt="$ \phi_t $" src="form_186.png"/> into it. This is achieved by a trivial extension using inheritance method <a class="el" href="classbdm_1_1BM.html#a6799f4b16a6a59ed58b1d0d6e17116f4" title="Substitute val for rvc.">bdm::BM::condition()</a>.</p> 
     155<p>Extension of standard ARX estimator to conditional estimator is implemented as class <a class="el" href="classbdm_1_1ARXfrg.html">bdm::ARXfrg</a>. The only difference from standard ARX is that this object will change its forgetting factor via method ARXfrg::condition(). Existence of this function is assumed by the MPF estimator. Informally, the name 'ARXfrg' means: "if anybody calls your condition(0.9), it tells you new value of forgetting factor".</p> 
     156<p>The MPF estimator is implemented by class <a class="el" href="classbdm_1_1MPF.html" title="Marginalized Particle filter.">bdm::MPF</a>. In the toolbox, it can be constructed as follows: </p> 
     157<div class="fragment"><pre class="fragment">%%%%%% ARX estimator conditioned on frg 
     158 
     159A1.class = <span class="stringliteral">&apos;ARXfrg&apos;</span>; 
     160A1.rv = y; 
     161A1.rgr = RVtimes([y,u],[-3,-1]) ;  
     162A1.options =<span class="stringliteral">&apos;logbounds,logll&apos;</span>; 
     163A1.frg = 0.9; 
     164A1.name = <span class="stringliteral">&apos;A1&apos;</span>; 
     165 
     166%%%%%% Random walk on frg - Dirichlet  
     167phi_pdf.class = <span class="stringliteral">&apos;mDirich&apos;</span>;         % random walk on coefficient phi 
     168phi_pdf.rv    = RV(<span class="stringliteral">&apos;phi&apos;</span>,2);       % 2D random walk - frg is the first element 
     169phi_pdf.k     = 0.01;              % width of the random walk 
     170phi_pdf.betac = [0.01 0.01];       % stabilizing elememnt of random walk 
     171 
     172%%%%%% Combining estimators in Marginalized particle filter 
     173E.class = <span class="stringliteral">&apos;MPF&apos;</span>; 
     174E.BM = A1;                         % ARX is the analytical part 
     175E.parameter_pdf = phi_pdf;         % Random walk is the parameter evolution model 
     176E.n = 20;                          % number of particles 
     177E.prior.class = <span class="stringliteral">&apos;eDirich&apos;</span>;         % prior on non-linear part 
     178E.prior.beta  = [1 1]; %  
     179E.options =<span class="stringliteral">&apos;logbounds,logll&apos;</span>; 
     180E.name = <span class="stringliteral">&apos;MPF&apos;</span>; 
     181 
     182M=estimator(DS,{E}); 
     183</pre></div><p>Here, the configuration structure <code>A1</code> is a description of an ARX model, as used in previous examples, the only difference is in its name 'ARXfrg'.</p> 
     184<p>The configuration structure <code>phi_pdf</code> defines random walk on the forgetting factor. It was chosen as Dirichlet, hence it will produce 2-dimensional vector of <img class="formulaInl" alt="$[\phi, 1-\phi]$" src="form_192.png"/>. The class <code>ARXfrg</code> was designed to read only the first element of its condition. The random walk of type mDirich is: </p> 
     185<p class="formulaDsp"> 
     186<img class="formulaDsp" alt="\[ f(\phi_t|\phi_{t-1}) = Di (\phi_{t-1}/k + \beta_c) \]" src="form_193.png"/> 
     187</p> 
     188<p> where <img class="formulaInl" alt="$ k $" src="form_89.png"/> influences the spread of the walk and <img class="formulaInl" alt="$ \beta_c $" src="form_189.png"/> has the role of stabilizing, to avoid traps of corner cases such as [0,1] and [1,0]. Its influence on the results is quite important.</p> 
     189<p>This example is implemented as bdmtoolbox/tutorial/userguide/frg_example.m Its typical run should look like the following: </p> 
     190<div align="center"> 
     191<img src="frg_example_small.png" alt="frg_example_small.png"/> 
    155192</div> 
    156 <hr size="1"/><address style="text-align: right;"><small>Generated on Fri Sep 18 00:12:03 2009 for mixpp by&nbsp; 
     193 <p>Note: error bars in this case are not directly comparable with those of previous examples. The MPF class implements the qbounds function as minimum and maximum of bounds in the condidered set (even if its weight is extreemly small). Hence, the bounds of the MPF are probably larger than it should be. Nevertheless, they provide great help when designing and tuning algorithms. </p> 
     194</div> 
     195<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 27 00:49:05 2009 for mixpp by&nbsp; 
    157196<a href="http://www.doxygen.org/index.html"> 
    158197<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>