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

Changes in the very root classes!
* rv and rvc are no longer compulsory,
* samplecond does not return ll
* BM has drv

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/latex/classbdm_1_1ARX.tex

    r269 r270  
    33\label{classbdm_1_1ARX}\index{bdm::ARX@{bdm::ARX}} 
    44} 
    5 Linear Autoregressive model with Gaussian noise.   
    6  
    7  
    85{\tt \#include $<$arx.h$>$} 
    96 
     
    1512\end{center} 
    1613\end{figure} 
    17 Collaboration diagram for bdm::ARX:\nopagebreak 
    18 \begin{figure}[H] 
    19 \begin{center} 
    20 \leavevmode 
    21 \includegraphics[height=400pt]{classbdm_1_1ARX__coll__graph} 
    22 \end{center} 
    23 \end{figure} 
    24 \subsection*{Public Member Functions} 
    25 \begin{CompactItemize} 
    26 \item  
    27 \hypertarget{classbdm_1_1ARX_44914d0b259204b3446db82b989bd626}{ 
    28 \hyperlink{classbdm_1_1ARX_44914d0b259204b3446db82b989bd626}{ARX} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}, const mat \&V0, const double \&nu0, const double frg0=1.0)} 
    29 \label{classbdm_1_1ARX_44914d0b259204b3446db82b989bd626} 
     14 
     15 
     16\subsection{Detailed Description} 
     17Linear Autoregressive model with Gaussian noise.  
     18 
     19Regression 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). \] 
     20 
     21Extension 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} 
    3027 
    3128\begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item  
     
    3532 
    3633\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item  
    37 \hypertarget{classbdm_1_1ARX_20ff2de8d862f28de7da83444d65bcdb}{ 
    38 \hyperlink{classbdm_1_1ARX}{ARX} $\ast$ \hyperlink{classbdm_1_1ARX_20ff2de8d862f28de7da83444d65bcdb}{\_\-copy\_\-} (bool changerv=false)} 
    39 \label{classbdm_1_1ARX_20ff2de8d862f28de7da83444d65bcdb} 
     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} 
    4037 
    4138\begin{CompactList}\small\item\em Auxiliary function. \item\end{CompactList}\item  
     
    6360\begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item  
    6461\hypertarget{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d}{ 
    65 const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d}{\_\-epdf} () const } 
     62const \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{\_\-epdf} () const } 
    6663\label{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d} 
    6764 
    68 \begin{CompactList}\small\item\em Returns a reference to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. \item\end{CompactList}\item  
     65\item  
    6966double \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{logpred} (const vec \&dt) const  
    7067\item  
     
    7471 
    7572\begin{CompactList}\small\item\em Flatten the posterior according to the given \hyperlink{classbdm_1_1BMEF}{BMEF} (of the same type!). \item\end{CompactList}\item  
    76 \hypertarget{classbdm_1_1ARX_7c8d1fe774fe1da50293d50ad8aef43d}{ 
    77 \hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classldmat}{ldmat} $>$ $\ast$ \hyperlink{classbdm_1_1ARX_7c8d1fe774fe1da50293d50ad8aef43d}{predictor} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0, const vec \&rgr) const } 
    78 \label{classbdm_1_1ARX_7c8d1fe774fe1da50293d50ad8aef43d} 
     73\hypertarget{classbdm_1_1ARX_749827323c034f11bec61b6e2fc3d42a}{ 
     74\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classldmat}{ldmat} $>$ $\ast$ \hyperlink{classbdm_1_1ARX_749827323c034f11bec61b6e2fc3d42a}{epredictor} (const vec \&rgr) const } 
     75\label{classbdm_1_1ARX_749827323c034f11bec61b6e2fc3d42a} 
    7976 
    8077\begin{CompactList}\small\item\em Conditioned version of the predictor. \item\end{CompactList}\item  
    81 \hypertarget{classbdm_1_1ARX_5b73b70457f49ce4ad8660d729172dfd}{ 
    82 \hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classldmat}{ldmat} $>$ $\ast$ \hyperlink{classbdm_1_1ARX_5b73b70457f49ce4ad8660d729172dfd}{predictor} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0) const } 
    83 \label{classbdm_1_1ARX_5b73b70457f49ce4ad8660d729172dfd} 
    84  
    85 \begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item  
    86 \hypertarget{classbdm_1_1ARX_02d9e91f21a700947a7b7eec1beed956}{ 
    87 \hyperlink{classbdm_1_1mlnorm}{mlnorm}$<$ \hyperlink{classldmat}{ldmat} $>$ $\ast$ \hyperlink{classbdm_1_1ARX_02d9e91f21a700947a7b7eec1beed956}{predictor} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0, const \hyperlink{classbdm_1_1RV}{RV} \&rvc0) const } 
    88 \label{classbdm_1_1ARX_02d9e91f21a700947a7b7eec1beed956} 
    89  
     78\hypertarget{classbdm_1_1ARX_4cdf5e2a7d3480ec31f6247ed4289b15}{ 
     79\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classldmat}{ldmat} $>$ $\ast$ \hyperlink{classbdm_1_1ARX_4cdf5e2a7d3480ec31f6247ed4289b15}{epredictor} () const } 
     80\label{classbdm_1_1ARX_4cdf5e2a7d3480ec31f6247ed4289b15} 
     81 
     82\begin{CompactList}\small\item\em Constructs a predictive density $ f(d_{t+1} |d_{t}, \ldots d_{0}) $. \item\end{CompactList}\item  
     83\hyperlink{classbdm_1_1mlnorm}{mlnorm}$<$ \hyperlink{classldmat}{ldmat} $>$ $\ast$ \hyperlink{classbdm_1_1ARX_74fe8ae2d88bee8639510fd0eaf73513}{predictor} () const  
    9084\begin{CompactList}\small\item\em conditional version of the predictor \item\end{CompactList}\item  
    91 \hypertarget{classbdm_1_1ARX_2ce8c6599497ffb94dfcb66d1fe7aca6}{ 
    92 \hyperlink{classbdm_1_1mlstudent}{mlstudent} $\ast$ \textbf{predictor\_\-student} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0, const \hyperlink{classbdm_1_1RV}{RV} \&rvc0) const } 
    93 \label{classbdm_1_1ARX_2ce8c6599497ffb94dfcb66d1fe7aca6} 
     85\hypertarget{classbdm_1_1ARX_c6a2428a46407fe45b4c7a99069c0801}{ 
     86\hyperlink{classbdm_1_1mlstudent}{mlstudent} $\ast$ \textbf{predictor\_\-student} () const } 
     87\label{classbdm_1_1ARX_c6a2428a46407fe45b4c7a99069c0801} 
    9488 
    9589\item  
     
    9791\begin{CompactList}\small\item\em Brute force structure estimation. \item\end{CompactList}\item  
    9892\hypertarget{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f}{ 
    99 const \hyperlink{classbdm_1_1egiw}{egiw} $\ast$ \hyperlink{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f}{\_\-e} () const } 
     93const \hyperlink{classbdm_1_1egiw}{egiw} $\ast$ \textbf{\_\-e} () const } 
    10094\label{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f} 
    10195 
    102 \begin{CompactList}\small\item\em Returns a pointer to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\item  
     96\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} 
     102\begin{Indent}{\bf Mathematical operations}\par 
     103\begin{CompactItemize} 
     104\item  
    103105\hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{ 
    104106virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)} 
     
    110112\label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae} 
    111113 
    112 \begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item  
    113 \hypertarget{classbdm_1_1BM_40a3c891996391e3135518053a917793}{ 
    114 const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BM_40a3c891996391e3135518053a917793}{\_\-rv} () const } 
    115 \label{classbdm_1_1BM_40a3c891996391e3135518053a917793} 
    116  
    117 \begin{CompactList}\small\item\em access function \item\end{CompactList}\item  
     114\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\end{CompactItemize} 
     115\end{Indent} 
     116\begin{Indent}{\bf Access to attributes}\par 
     117\begin{CompactItemize} 
     118\item  
    118119\hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{ 
    119 const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{\_\-drv} () const } 
     120const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const } 
    120121\label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c} 
    121122 
    122 \begin{CompactList}\small\item\em access function \item\end{CompactList}\item  
     123\item  
    123124\hypertarget{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{ 
    124 void \hyperlink{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv})} 
     125void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} 
    125126\label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96} 
    126127 
    127 \begin{CompactList}\small\item\em set drv \item\end{CompactList}\item  
     128\item  
    128129\hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{ 
    129 double \hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const } 
     130double \textbf{\_\-ll} () const } 
    130131\label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70} 
    131132 
    132 \begin{CompactList}\small\item\em access function \item\end{CompactList}\item  
     133\item  
    133134\hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{ 
    134 void \hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)} 
     135void \textbf{set\_\-evalll} (bool evl0)} 
    135136\label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f} 
    136137 
    137 \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} 
     138\end{CompactItemize} 
     139\end{Indent} 
    138140\subsection*{Protected Attributes} 
    139141\begin{CompactItemize} 
     
    164166 
    165167\begin{CompactList}\small\item\em cached value of lognc() in the previous step (used in evaluation of {\tt ll} ) \item\end{CompactList}\item  
    166 \hypertarget{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{ 
    167 \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}} 
    168 \label{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca} 
    169  
    170 \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item  
    171168\hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{ 
    172169\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}} 
     
    185182\begin{CompactList}\small\item\em If true, the filter will compute likelihood of the data record and store it in {\tt ll} . Set to false if you want to save computational time. \item\end{CompactList}\end{CompactItemize} 
    186183 
    187  
    188 \subsection{Detailed Description} 
    189 Linear Autoregressive model with Gaussian noise.  
    190  
    191 Regression 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). \] 
    192  
    193 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.  
    194184 
    195185\subsection{Member Function Documentation} 
     
    223213Reimplemented from \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{bdm::BM}. 
    224214 
    225 References bdm::egiw::\_\-nu(), bdm::egiw::\_\-V(), est, bdm::BM::evalll, bdm::BMEF::frg, bdm::BMEF::last\_\-lognc, bdm::egiw::lognc(), nu, ldmat::opupdt(), bdm::egiw::pow(), and V.\hypertarget{classbdm_1_1ARX_16b02ae03316751664c22d59d90c1e34}{ 
     215References bdm::egiw::\_\-nu(), bdm::egiw::\_\-V(), est, bdm::BM::evalll, bdm::BMEF::frg, bdm::BMEF::last\_\-lognc, bdm::egiw::lognc(), nu, ldmat::opupdt(), bdm::egiw::pow(), and V.\hypertarget{classbdm_1_1ARX_74fe8ae2d88bee8639510fd0eaf73513}{ 
     216\index{bdm::ARX@{bdm::ARX}!predictor@{predictor}} 
     217\index{predictor@{predictor}!bdm::ARX@{bdm::ARX}} 
     218\subsubsection[predictor]{\setlength{\rightskip}{0pt plus 5cm}{\bf mlnorm}$<$ {\bf ldmat} $>$ $\ast$ bdm::ARX::predictor () const\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}} 
     219\label{classbdm_1_1ARX_74fe8ae2d88bee8639510fd0eaf73513} 
     220 
     221 
     222conditional version of the predictor  
     223 
     224 
     225 
     226$<$----------- TODO  
     227 
     228Reimplemented from \hyperlink{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{bdm::BM}. 
     229 
     230References bdm::epdf::dimension(), est, bdm::egiw::mean\_\-mat(), ldmat::rows(), bdm::mlnorm$<$ sq\_\-T $>$::set\_\-parameters(), and V.\hypertarget{classbdm_1_1ARX_16b02ae03316751664c22d59d90c1e34}{ 
    226231\index{bdm::ARX@{bdm::ARX}!structure\_\-est@{structure\_\-est}} 
    227232\index{structure\_\-est@{structure\_\-est}!bdm::ARX@{bdm::ARX}} 
     
    236241 
    237242 
    238 References bdm::RV::count(), bdm::egiw\_\-bestbelow(), est, and bdm::egiw::lognc(). 
     243References bdm::epdf::dimension(), bdm::egiw\_\-bestbelow(), est, and bdm::egiw::lognc(). 
    239244 
    240245The documentation for this class was generated from the following files:\begin{CompactItemize}