Changeset 270 for doc/latex/classbdm_1_1ARX.tex
- Timestamp:
- 02/16/09 10:02:08 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
doc/latex/classbdm_1_1ARX.tex
r269 r270 3 3 \label{classbdm_1_1ARX}\index{bdm::ARX@{bdm::ARX}} 4 4 } 5 Linear Autoregressive model with Gaussian noise.6 7 8 5 {\tt \#include $<$arx.h$>$} 9 6 … … 15 12 \end{center} 16 13 \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_4 4914d0b259204b3446db82b989bd626}{28 \hyperlink{classbdm_1_1ARX_4 4914d0b259204b3446db82b989bd626}{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_4 4914d0b259204b3446db82b989bd626}14 15 16 \subsection{Detailed Description} 17 Linear Autoregressive model with Gaussian noise. 18 19 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). \] 20 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} 30 27 31 28 \begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item … … 35 32 36 33 \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} 40 37 41 38 \begin{CompactList}\small\item\em Auxiliary function. \item\end{CompactList}\item … … 63 60 \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 64 61 \hypertarget{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d}{ 65 const \hyperlink{classbdm_1_1epdf}{epdf} \& \ hyperlink{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d}{\_\-epdf} () const }62 const \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{\_\-epdf} () const } 66 63 \label{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d} 67 64 68 \ begin{CompactList}\small\item\em Returns a reference to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. \item\end{CompactList}\item65 \item 69 66 double \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{logpred} (const vec \&dt) const 70 67 \item … … 74 71 75 72 \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_7 c8d1fe774fe1da50293d50ad8aef43d}{77 \hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classldmat}{ldmat} $>$ $\ast$ \hyperlink{classbdm_1_1ARX_7 c8d1fe774fe1da50293d50ad8aef43d}{predictor} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0,const vec \&rgr) const }78 \label{classbdm_1_1ARX_7 c8d1fe774fe1da50293d50ad8aef43d}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} 79 76 80 77 \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 90 84 \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} 94 88 95 89 \item … … 97 91 \begin{CompactList}\small\item\em Brute force structure estimation. \item\end{CompactList}\item 98 92 \hypertarget{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f}{ 99 const \hyperlink{classbdm_1_1egiw}{egiw} $\ast$ \ hyperlink{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f}{\_\-e} () const }93 const \hyperlink{classbdm_1_1egiw}{egiw} $\ast$ \textbf{\_\-e} () const } 100 94 \label{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f} 101 95 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 103 105 \hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{ 104 106 virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)} … … 110 112 \label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae} 111 113 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 118 119 \hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{ 119 const \hyperlink{classbdm_1_1RV}{RV} \& \ hyperlink{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{\_\-drv} () const }120 const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const } 120 121 \label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c} 121 122 122 \ begin{CompactList}\small\item\em access function \item\end{CompactList}\item123 \item 123 124 \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})}125 void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} 125 126 \label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96} 126 127 127 \ begin{CompactList}\small\item\em set drv \item\end{CompactList}\item128 \item 128 129 \hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{ 129 double \ hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const }130 double \textbf{\_\-ll} () const } 130 131 \label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70} 131 132 132 \ begin{CompactList}\small\item\em access function \item\end{CompactList}\item133 \item 133 134 \hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{ 134 void \ hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)}135 void \textbf{set\_\-evalll} (bool evl0)} 135 136 \label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f} 136 137 137 \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} 138 \end{CompactItemize} 139 \end{Indent} 138 140 \subsection*{Protected Attributes} 139 141 \begin{CompactItemize} … … 164 166 165 167 \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}\item171 168 \hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{ 172 169 \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}} … … 185 182 \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} 186 183 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.194 184 195 185 \subsection{Member Function Documentation} … … 223 213 Reimplemented from \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{bdm::BM}. 224 214 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}{ 215 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_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 222 conditional version of the predictor 223 224 225 226 $<$----------- TODO 227 228 Reimplemented from \hyperlink{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{bdm::BM}. 229 230 References bdm::epdf::dimension(), est, bdm::egiw::mean\_\-mat(), ldmat::rows(), bdm::mlnorm$<$ sq\_\-T $>$::set\_\-parameters(), and V.\hypertarget{classbdm_1_1ARX_16b02ae03316751664c22d59d90c1e34}{ 226 231 \index{bdm::ARX@{bdm::ARX}!structure\_\-est@{structure\_\-est}} 227 232 \index{structure\_\-est@{structure\_\-est}!bdm::ARX@{bdm::ARX}} … … 236 241 237 242 238 References bdm:: RV::count(), bdm::egiw\_\-bestbelow(), est, and bdm::egiw::lognc().243 References bdm::epdf::dimension(), bdm::egiw\_\-bestbelow(), est, and bdm::egiw::lognc(). 239 244 240 245 The documentation for this class was generated from the following files:\begin{CompactItemize}