root/doc/latex/classbdm_1_1ARX.tex @ 261

Revision 261, 13.4 kB (checked in by smidl, 16 years ago)

doc

Line 
1\hypertarget{classbdm_1_1ARX}{
2\section{bdm::ARX Class Reference}
3\label{classbdm_1_1ARX}\index{bdm::ARX@{bdm::ARX}}
4}
5Linear Autoregressive model with Gaussian noise. 
6
7
8{\tt \#include $<$arx.h$>$}
9
10Inheritance diagram for bdm::ARX:\nopagebreak
11\begin{figure}[H]
12\begin{center}
13\leavevmode
14\includegraphics[width=64pt]{classbdm_1_1ARX__inherit__graph}
15\end{center}
16\end{figure}
17Collaboration 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}
30
31\begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item 
32\hypertarget{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}{
33\hyperlink{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}{ARX} (const \hyperlink{classbdm_1_1ARX}{ARX} \&A0)}
34\label{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}
35
36\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}
40
41\begin{CompactList}\small\item\em Auxiliary function. \item\end{CompactList}\item 
42\hypertarget{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0}{
43void \hyperlink{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0}{set\_\-parameters} (const \hyperlink{classldmat}{ldmat} \&V0, const double \&nu0)}
44\label{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0}
45
46\begin{CompactList}\small\item\em Set sufficient statistics. \item\end{CompactList}\item 
47\hypertarget{classbdm_1_1ARX_539f9d0127423c94b912708d390e67b8}{
48void \hyperlink{classbdm_1_1ARX_539f9d0127423c94b912708d390e67b8}{set\_\-statistics} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$BM0)}
49\label{classbdm_1_1ARX_539f9d0127423c94b912708d390e67b8}
50
51\begin{CompactList}\small\item\em get statistics from another model \item\end{CompactList}\item 
52\hypertarget{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad}{
53void \hyperlink{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad}{get\_\-parameters} (mat \&V0, double \&nu0)}
54\label{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad}
55
56\begin{CompactList}\small\item\em Returns sufficient statistics. \item\end{CompactList}\item 
57\hypertarget{classbdm_1_1ARX_17e7fe14654ab3c449846c3f43e66169}{
58void \hyperlink{classbdm_1_1ARX_17e7fe14654ab3c449846c3f43e66169}{bayes} (const vec \&dt, const double w)}
59\label{classbdm_1_1ARX_17e7fe14654ab3c449846c3f43e66169}
60
61\begin{CompactList}\small\item\em Here $dt = [y_t psi_t] $. \item\end{CompactList}\item 
62void \hyperlink{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{bayes} (const vec \&dt)
63\begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 
64\hypertarget{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d}{
65const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d}{\_\-epdf} () const }
66\label{classbdm_1_1ARX_16797df43f85f1ddbe9d64fd6d82c25d}
67
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 
69double \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{logpred} (const vec \&dt) const
70\item 
71\hypertarget{classbdm_1_1ARX_e86ab499b116b837d3163ec852961eca}{
72void \hyperlink{classbdm_1_1ARX_e86ab499b116b837d3163ec852961eca}{flatten} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$B)}
73\label{classbdm_1_1ARX_e86ab499b116b837d3163ec852961eca}
74
75\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}
79
80\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
90\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}
94
95\item 
96ivec \hyperlink{classbdm_1_1ARX_16b02ae03316751664c22d59d90c1e34}{structure\_\-est} (\hyperlink{classbdm_1_1egiw}{egiw} Eg0)
97\begin{CompactList}\small\item\em Brute force structure estimation. \item\end{CompactList}\item 
98\hypertarget{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f}{
99const \hyperlink{classbdm_1_1egiw}{egiw} $\ast$ \hyperlink{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f}{\_\-e} () const }
100\label{classbdm_1_1ARX_ab2c55205a324e9d698fbd8ac229ad4f}
101
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 
103\hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{
104virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)}
105\label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}
106
107\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
108\hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{
109vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const }
110\label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}
111
112\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item 
113\hypertarget{classbdm_1_1BM_40a3c891996391e3135518053a917793}{
114const \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 
118\hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{
119double \hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const }
120\label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}
121
122\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
123\hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{
124void \hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)}
125\label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}
126
127\begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize}
128\subsection*{Protected Attributes}
129\begin{CompactItemize}
130\item 
131\hypertarget{classbdm_1_1ARX_11474a627367f81b76830cb8477cf026}{
132\hyperlink{classbdm_1_1egiw}{egiw} \hyperlink{classbdm_1_1ARX_11474a627367f81b76830cb8477cf026}{est}}
133\label{classbdm_1_1ARX_11474a627367f81b76830cb8477cf026}
134
135\begin{CompactList}\small\item\em Posterior estimate of $\theta,r$ in the form of Normal-inverse Wishart density. \item\end{CompactList}\item 
136\hypertarget{classbdm_1_1ARX_de5b7d83ff5d3f5af2f80068db0abdfd}{
137\hyperlink{classldmat}{ldmat} \& \hyperlink{classbdm_1_1ARX_de5b7d83ff5d3f5af2f80068db0abdfd}{V}}
138\label{classbdm_1_1ARX_de5b7d83ff5d3f5af2f80068db0abdfd}
139
140\begin{CompactList}\small\item\em cached value of est.V \item\end{CompactList}\item 
141\hypertarget{classbdm_1_1ARX_740b0582f180ba13cae91d66e9bdb67f}{
142double \& \hyperlink{classbdm_1_1ARX_740b0582f180ba13cae91d66e9bdb67f}{nu}}
143\label{classbdm_1_1ARX_740b0582f180ba13cae91d66e9bdb67f}
144
145\begin{CompactList}\small\item\em cached value of est.nu \item\end{CompactList}\item 
146\hypertarget{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}{
147double \hyperlink{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}{frg}}
148\label{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}
149
150\begin{CompactList}\small\item\em forgetting factor \item\end{CompactList}\item 
151\hypertarget{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865}{
152double \hyperlink{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865}{last\_\-lognc}}
153\label{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865}
154
155\begin{CompactList}\small\item\em cached value of lognc() in the previous step (used in evaluation of {\tt ll} ) \item\end{CompactList}\item 
156\hypertarget{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{
157\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}}
158\label{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}
159
160\begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 
161\hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{
162double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}}
163\label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}
164
165\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
166\hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{
167bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}}
168\label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}
169
170\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}
171
172
173\subsection{Detailed Description}
174Linear Autoregressive model with Gaussian noise.
175
176Regression 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). \]
177
178Extension 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.
179
180\subsection{Member Function Documentation}
181\hypertarget{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{
182\index{bdm::ARX@{bdm::ARX}!bayes@{bayes}}
183\index{bayes@{bayes}!bdm::ARX@{bdm::ARX}}
184\subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}void bdm::ARX::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
185\label{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}
186
187
188Incremental Bayes rule.
189
190\begin{Desc}
191\item[Parameters:]
192\begin{description}
193\item[{\em dt}]vector of input data \end{description}
194\end{Desc}
195
196
197Reimplemented from \hyperlink{classbdm_1_1BMEF_c287f4c0c1ea31b91572ec45351838f1}{bdm::BMEF}.
198
199References bayes().\hypertarget{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{
200\index{bdm::ARX@{bdm::ARX}!logpred@{logpred}}
201\index{logpred@{logpred}!bdm::ARX@{bdm::ARX}}
202\subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}double bdm::ARX::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
203\label{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}
204
205
206Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
207
208Reimplemented from \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{bdm::BM}.
209
210References 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}{
211\index{bdm::ARX@{bdm::ARX}!structure\_\-est@{structure\_\-est}}
212\index{structure\_\-est@{structure\_\-est}!bdm::ARX@{bdm::ARX}}
213\subsubsection[structure\_\-est]{\setlength{\rightskip}{0pt plus 5cm}ivec bdm::ARX::structure\_\-est ({\bf egiw} {\em Eg0})}}
214\label{classbdm_1_1ARX_16b02ae03316751664c22d59d90c1e34}
215
216
217Brute force structure estimation.
218
219\begin{Desc}
220\item[Returns:]indeces of accepted regressors. \end{Desc}
221
222
223References bdm::RV::count(), bdm::egiw\_\-bestbelow(), est, and bdm::egiw::lognc().
224
225The documentation for this class was generated from the following files:\begin{CompactItemize}
226\item 
227\hyperlink{arx_8h}{arx.h}\item 
228bdm/estim/arx.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.