Show
Ignore:
Timestamp:
02/16/09 10:03:13 (16 years ago)
Author:
smidl
Message:

Next major revision

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/latex/classbdm_1_1ARX.tex

    r270 r271  
    55{\tt \#include $<$arx.h$>$} 
    66 
    7 Inheritance diagram for bdm::ARX:\nopagebreak 
    8 \begin{figure}[H] 
     7Inheritance diagram for bdm::ARX::\begin{figure}[H] 
    98\begin{center} 
    109\leavevmode 
    11 \includegraphics[width=64pt]{classbdm_1_1ARX__inherit__graph} 
     10\includegraphics[height=4cm]{classbdm_1_1ARX} 
    1211\end{center} 
    1312\end{figure} 
     
    1918Regression of the following kind: \[ y_t = \theta_1 \psi_1 + \theta_2 + \psi_2 +\ldots + \theta_n \psi_n + r e_t \] where unknown parameters {\tt rv} are $[\theta r]$, regression vector $\psi=\psi(y_{1:t},u_{1:t})$ is a known function of past outputs and exogeneous variables $u_t$. Distrubances $e_t$ are supposed to be normally distributed: \[ e_t \sim \mathcal{N}(0,1). \] 
    2019 
    21 Extension for time-variant parameters $\theta_t,r_t$ may be achived using exponential forgetting (Kulhavy and Zarrop, 1993). In such a case, the forgetting factor {\tt frg} $\in <0,1>$ should be given in the constructor. Time-invariant parameters are estimated for {\tt frg} = 1. \subsection*{Public Member Functions} 
    22 \begin{CompactItemize} 
    23 \item  
    24 \hypertarget{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98}{ 
    25 \hyperlink{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98}{ARX} (const double frg0=1.0)} 
    26 \label{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98} 
    27  
    28 \begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item  
    29 \hypertarget{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}{ 
    30 \hyperlink{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}{ARX} (const \hyperlink{classbdm_1_1ARX}{ARX} \&A0)} 
    31 \label{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed} 
    32  
    33 \begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item  
    34 \hypertarget{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{ 
    35 \hyperlink{classbdm_1_1ARX}{ARX} $\ast$ \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{\_\-copy\_\-} ()} 
    36 \label{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61} 
    37  
    38 \begin{CompactList}\small\item\em Auxiliary function. \item\end{CompactList}\item  
    39 \hypertarget{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0}{ 
    40 void \hyperlink{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0}{set\_\-parameters} (const \hyperlink{classldmat}{ldmat} \&V0, const double \&nu0)} 
    41 \label{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0} 
    42  
    43 \begin{CompactList}\small\item\em Set sufficient statistics. \item\end{CompactList}\item  
     20See \hyperlink{tut_arx}{Theory of ARX model estimation} for mathematical treatment. 
     21 
     22The easiest way how to use the class is:  
     23 
     24\begin{DocInclude}\begin{verbatim}#include <estim/arx.h> 
     25using namespace bdm; 
     26         
     27// estimation of AR(0) model 
     28int main() { 
     29        //prior  
     30        mat V0 = 0.00001*eye(2); V0(0,0)= 0.1; // 
     31        ARX Ar;  
     32        Ar.set_statistics(1, V0); //nu is default (set to have finite moments) 
     33                                                          // forgetting is default: 1.0 
     34        mat Data = concat_vertical( randn(1,100), ones(1,100) ); 
     35        Ar.bayesB( Data);  
     36                         
     37        cout << "Expected value of Theta is: " << Ar.posterior().mean() <<endl; 
     38} 
     39\end{verbatim} 
     40\end{DocInclude} 
     41 \subsection*{Public Member Functions} 
     42\begin{CompactItemize} 
     43\item  
    4444\hypertarget{classbdm_1_1ARX_539f9d0127423c94b912708d390e67b8}{ 
    4545void \hyperlink{classbdm_1_1ARX_539f9d0127423c94b912708d390e67b8}{set\_\-statistics} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$BM0)} 
    4646\label{classbdm_1_1ARX_539f9d0127423c94b912708d390e67b8} 
    4747 
    48 \begin{CompactList}\small\item\em get statistics from another model \item\end{CompactList}\item  
    49 \hypertarget{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad}{ 
    50 void \hyperlink{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad}{get\_\-parameters} (mat \&V0, double \&nu0)} 
    51 \label{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad} 
    52  
    53 \begin{CompactList}\small\item\em Returns sufficient statistics. \item\end{CompactList}\item  
     48\begin{CompactList}\small\item\em Set sufficient statistics. \item\end{CompactList}\item  
     49\hypertarget{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{ 
     50\hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$ \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{\_\-copy\_\-} (bool changerv=false)} 
     51\label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6} 
     52 
     53\begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \item\end{CompactList}\end{CompactItemize} 
     54\begin{Indent}{\bf Constructors}\par 
     55\begin{CompactItemize} 
     56\item  
     57\hypertarget{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98}{ 
     58\textbf{ARX} (const double frg0=1.0)} 
     59\label{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98} 
     60 
     61\item  
     62\hypertarget{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}{ 
     63\textbf{ARX} (const \hyperlink{classbdm_1_1ARX}{ARX} \&A0)} 
     64\label{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed} 
     65 
     66\item  
     67\hyperlink{classbdm_1_1ARX}{ARX} $\ast$ \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{\_\-copy\_\-} () 
     68\item  
     69\hypertarget{classbdm_1_1ARX_7aef6fe827f15427d534e6fb2c220e04}{ 
     70void \textbf{set\_\-parameters} (double frg0)} 
     71\label{classbdm_1_1ARX_7aef6fe827f15427d534e6fb2c220e04} 
     72 
     73\item  
     74\hypertarget{classbdm_1_1ARX_f859f53eab269845a9064bbd92f841af}{ 
     75void \textbf{set\_\-statistics} (int dimx0, const \hyperlink{classldmat}{ldmat} V0, double nu0=-1.0)} 
     76\label{classbdm_1_1ARX_f859f53eab269845a9064bbd92f841af} 
     77 
     78\end{CompactItemize} 
     79\end{Indent} 
     80\begin{Indent}{\bf Mathematical operations}\par 
     81\begin{CompactItemize} 
     82\item  
    5483\hypertarget{classbdm_1_1ARX_17e7fe14654ab3c449846c3f43e66169}{ 
    5584void \hyperlink{classbdm_1_1ARX_17e7fe14654ab3c449846c3f43e66169}{bayes} (const vec \&dt, const double w)} 
    5685\label{classbdm_1_1ARX_17e7fe14654ab3c449846c3f43e66169} 
    5786 
    58 \begin{CompactList}\small\item\em Here $dt = [y_t psi_t] $. \item\end{CompactList}\item  
     87\begin{CompactList}\small\item\em Weighted Bayes $ dt = [y_t psi_t] $. \item\end{CompactList}\item  
    5988void \hyperlink{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{bayes} (const vec \&dt) 
    6089\begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item  
    61 \hypertarget{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d}{ 
    62 const \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{\_\-epdf} () const } 
    63 \label{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d} 
    64  
    65 \item  
    6690double \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{logpred} (const vec \&dt) const  
    6791\item  
     
    80104\label{classbdm_1_1ARX_4cdf5e2a7d3480ec31f6247ed4289b15} 
    81105 
    82 \begin{CompactList}\small\item\em Constructs a predictive density $ f(d_{t+1} |d_{t}, \ldots d_{0}) $. \item\end{CompactList}\item  
     106\begin{CompactList}\small\item\em Predictor for empty regressor. \item\end{CompactList}\item  
    83107\hyperlink{classbdm_1_1mlnorm}{mlnorm}$<$ \hyperlink{classldmat}{ldmat} $>$ $\ast$ \hyperlink{classbdm_1_1ARX_74fe8ae2d88bee8639510fd0eaf73513}{predictor} () const  
    84108\begin{CompactList}\small\item\em conditional version of the predictor \item\end{CompactList}\item  
     
    89113\item  
    90114ivec \hyperlink{classbdm_1_1ARX_16b02ae03316751664c22d59d90c1e34}{structure\_\-est} (\hyperlink{classbdm_1_1egiw}{egiw} Eg0) 
    91 \begin{CompactList}\small\item\em Brute force structure estimation. \item\end{CompactList}\item  
     115\begin{CompactList}\small\item\em Brute force structure estimation. \item\end{CompactList}\end{CompactItemize} 
     116\end{Indent} 
     117\begin{Indent}{\bf Access attributes}\par 
     118\begin{CompactItemize} 
     119\item  
    92120\hypertarget{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f}{ 
    93121const \hyperlink{classbdm_1_1egiw}{egiw} $\ast$ \textbf{\_\-e} () const } 
     
    95123 
    96124\item  
    97 \hypertarget{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{ 
    98 \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$ \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{\_\-copy\_\-} (bool changerv=false)} 
    99 \label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6} 
    100  
    101 \begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \item\end{CompactList}\end{CompactItemize} 
     125\hypertarget{classbdm_1_1ARX_5a96a50d212648f049122a31d9553618}{ 
     126const \hyperlink{classbdm_1_1egiw}{egiw} \& \textbf{posterior} () const } 
     127\label{classbdm_1_1ARX_5a96a50d212648f049122a31d9553618} 
     128 
     129\end{CompactItemize} 
     130\end{Indent} 
     131\begin{Indent}{\bf Connection}\par 
     132\begin{CompactItemize} 
     133\item  
     134\hypertarget{classbdm_1_1ARX_df3dc1b90efc0cc54a3a6e5e858542d1}{ 
     135void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&drv0)} 
     136\label{classbdm_1_1ARX_df3dc1b90efc0cc54a3a6e5e858542d1} 
     137 
     138\item  
     139\hypertarget{classbdm_1_1ARX_7b96872783ab72e135b7b9ee26ef0577}{ 
     140\hyperlink{classbdm_1_1RV}{RV} \& \textbf{get\_\-yrv} ()} 
     141\label{classbdm_1_1ARX_7b96872783ab72e135b7b9ee26ef0577} 
     142 
     143\end{CompactItemize} 
     144\end{Indent} 
    102145\begin{Indent}{\bf Mathematical operations}\par 
    103146\begin{CompactItemize} 
     
    122165 
    123166\item  
    124 \hypertarget{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{ 
    125 void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} 
    126 \label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96} 
     167\hypertarget{classbdm_1_1BM_b38d92f17620813ad872d86e01a26e5e}{ 
     168void \textbf{set\_\-rv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} 
     169\label{classbdm_1_1BM_b38d92f17620813ad872d86e01a26e5e} 
    127170 
    128171\item  
     
    140183\subsection*{Protected Attributes} 
    141184\begin{CompactItemize} 
     185\item  
     186\hypertarget{classbdm_1_1ARX_8e68db2a218d54b09304cad6c0a897d9}{ 
     187int \hyperlink{classbdm_1_1ARX_8e68db2a218d54b09304cad6c0a897d9}{dimx}} 
     188\label{classbdm_1_1ARX_8e68db2a218d54b09304cad6c0a897d9} 
     189 
     190\begin{CompactList}\small\item\em size of output variable (needed in regressors) \item\end{CompactList}\item  
     191\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1ARX_363aaa55b2ab3eec602510cdf53e84ef}{\_\-yrv} 
    142192\item  
    143193\hypertarget{classbdm_1_1ARX_11474a627367f81b76830cb8477cf026}{ 
     
    184234 
    185235\subsection{Member Function Documentation} 
    186 \hypertarget{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{ 
     236\hypertarget{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{ 
     237\index{bdm::ARX@{bdm::ARX}!\_\-copy\_\-@{\_\-copy\_\-}} 
     238\index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::ARX@{bdm::ARX}} 
     239\subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}{\bf ARX} $\ast$ bdm::ARX::\_\-copy\_\- ()\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}} 
     240\label{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61} 
     241 
     242 
     243Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype:  
     244 
     245\begin{Code}\begin{verbatim} BM* _copy_(){return new BM(*this);}  
     246\end{verbatim} 
     247\end{Code} 
     248 
     249  
     250 
     251Reimplemented from \hyperlink{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{bdm::BM}.\hypertarget{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{ 
    187252\index{bdm::ARX@{bdm::ARX}!bayes@{bayes}} 
    188253\index{bayes@{bayes}!bdm::ARX@{bdm::ARX}} 
     
    241306 
    242307 
    243 References bdm::epdf::dimension(), bdm::egiw\_\-bestbelow(), est, and bdm::egiw::lognc(). 
     308References bdm::epdf::dimension(), est, and bdm::egiw::lognc(). 
     309 
     310\subsection{Member Data Documentation} 
     311\hypertarget{classbdm_1_1ARX_363aaa55b2ab3eec602510cdf53e84ef}{ 
     312\index{bdm::ARX@{bdm::ARX}!\_\-yrv@{\_\-yrv}} 
     313\index{\_\-yrv@{\_\-yrv}!bdm::ARX@{bdm::ARX}} 
     314\subsubsection[\_\-yrv]{\setlength{\rightskip}{0pt plus 5cm}{\bf RV} {\bf bdm::ARX::\_\-yrv}\hspace{0.3cm}{\tt  \mbox{[}protected\mbox{]}}}} 
     315\label{classbdm_1_1ARX_363aaa55b2ab3eec602510cdf53e84ef} 
     316 
     317 
     318description of modelled data $ y_t $ in the likelihood function Do NOT access directly, only via {\tt get\_\-yrv()}.  
    244319 
    245320The documentation for this class was generated from the following files:\begin{CompactItemize}