root/doc/latex/classbdm_1_1BMEF.tex @ 271

Revision 271, 10.2 kB (checked in by smidl, 16 years ago)

Next major revision

Line 
1\hypertarget{classbdm_1_1BMEF}{
2\section{bdm::BMEF Class Reference}
3\label{classbdm_1_1BMEF}\index{bdm::BMEF@{bdm::BMEF}}
4}
5{\tt \#include $<$libEF.h$>$}
6
7Inheritance diagram for bdm::BMEF::\begin{figure}[H]
8\begin{center}
9\leavevmode
10\includegraphics[height=4cm]{classbdm_1_1BMEF}
11\end{center}
12\end{figure}
13
14
15\subsection{Detailed Description}
16Estimator for Exponential family. \subsection*{Public Member Functions}
17\begin{CompactItemize}
18\item 
19\hypertarget{classbdm_1_1BMEF_2def512872ed8a4fc3b702371ec0be55}{
20\hyperlink{classbdm_1_1BMEF_2def512872ed8a4fc3b702371ec0be55}{BMEF} (double frg0=1.0)}
21\label{classbdm_1_1BMEF_2def512872ed8a4fc3b702371ec0be55}
22
23\begin{CompactList}\small\item\em Default constructor (=empty constructor). \item\end{CompactList}\item 
24\hypertarget{classbdm_1_1BMEF_9662379513101405e159e76717104e62}{
25\hyperlink{classbdm_1_1BMEF_9662379513101405e159e76717104e62}{BMEF} (const \hyperlink{classbdm_1_1BMEF}{BMEF} \&B)}
26\label{classbdm_1_1BMEF_9662379513101405e159e76717104e62}
27
28\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 
29\hypertarget{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051}{
30virtual void \hyperlink{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051}{set\_\-statistics} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$BM0)}
31\label{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051}
32
33\begin{CompactList}\small\item\em get statistics from another model \item\end{CompactList}\item 
34\hypertarget{classbdm_1_1BMEF_bf58deb99af2a6cc674f13ff90300de6}{
35virtual void \hyperlink{classbdm_1_1BMEF_bf58deb99af2a6cc674f13ff90300de6}{bayes} (const vec \&data, const double w)}
36\label{classbdm_1_1BMEF_bf58deb99af2a6cc674f13ff90300de6}
37
38\begin{CompactList}\small\item\em Weighted update of sufficient statistics (Bayes rule). \item\end{CompactList}\item 
39void \hyperlink{classbdm_1_1BMEF_c287f4c0c1ea31b91572ec45351838f1}{bayes} (const vec \&dt)
40\begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 
41\hypertarget{classbdm_1_1BMEF_b2916a2e71a958665054473124d5e749}{
42virtual void \hyperlink{classbdm_1_1BMEF_b2916a2e71a958665054473124d5e749}{flatten} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$B)}
43\label{classbdm_1_1BMEF_b2916a2e71a958665054473124d5e749}
44
45\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 
46\hypertarget{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{
47\hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$ \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{\_\-copy\_\-} (bool changerv=false)}
48\label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}
49
50\begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \item\end{CompactList}\end{CompactItemize}
51\begin{Indent}{\bf Constructors}\par
52\begin{CompactItemize}
53\item 
54virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{\_\-copy\_\-} ()
55\end{CompactItemize}
56\end{Indent}
57\begin{Indent}{\bf Mathematical operations}\par
58\begin{CompactItemize}
59\item 
60\hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{
61virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)}
62\label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}
63
64\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
65virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const
66\item 
67\hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{
68vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const }
69\label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}
70
71\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item 
72\hypertarget{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{
73virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{epredictor} () const }
74\label{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}
75
76\begin{CompactList}\small\item\em Constructs a predictive density $ f(d_{t+1} |d_{t}, \ldots d_{0}) $. \item\end{CompactList}\item 
77\hypertarget{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{
78virtual \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ \hyperlink{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{predictor} () const }
79\label{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}
80
81\begin{CompactList}\small\item\em Constructs a conditional density 1-step ahead predictor. \item\end{CompactList}\end{CompactItemize}
82\end{Indent}
83\begin{Indent}{\bf Access to attributes}\par
84\begin{CompactItemize}
85\item 
86\hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{
87const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const }
88\label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}
89
90\item 
91\hypertarget{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{
92void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)}
93\label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}
94
95\item 
96\hypertarget{classbdm_1_1BM_b38d92f17620813ad872d86e01a26e5e}{
97void \textbf{set\_\-rv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)}
98\label{classbdm_1_1BM_b38d92f17620813ad872d86e01a26e5e}
99
100\item 
101\hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{
102double \textbf{\_\-ll} () const }
103\label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}
104
105\item 
106\hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{
107void \textbf{set\_\-evalll} (bool evl0)}
108\label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}
109
110\item 
111\hypertarget{classbdm_1_1BM_bb7b0065d6cb722a66b371a8260121e1}{
112virtual const \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{posterior} () const =0}
113\label{classbdm_1_1BM_bb7b0065d6cb722a66b371a8260121e1}
114
115\item 
116\hypertarget{classbdm_1_1BM_4ed0f8b880e606316ae800f3a011c3a6}{
117virtual const \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \textbf{\_\-e} () const =0}
118\label{classbdm_1_1BM_4ed0f8b880e606316ae800f3a011c3a6}
119
120\end{CompactItemize}
121\end{Indent}
122\subsection*{Protected Attributes}
123\begin{CompactItemize}
124\item 
125\hypertarget{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}{
126double \hyperlink{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}{frg}}
127\label{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}
128
129\begin{CompactList}\small\item\em forgetting factor \item\end{CompactList}\item 
130\hypertarget{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865}{
131double \hyperlink{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865}{last\_\-lognc}}
132\label{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865}
133
134\begin{CompactList}\small\item\em cached value of lognc() in the previous step (used in evaluation of {\tt ll} ) \item\end{CompactList}\item 
135\hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{
136\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}}
137\label{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}
138
139\begin{CompactList}\small\item\em Random variable of the data (optional). \item\end{CompactList}\item 
140\hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{
141double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}}
142\label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}
143
144\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
145\hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{
146bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}}
147\label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}
148
149\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}
150
151
152\subsection{Member Function Documentation}
153\hypertarget{classbdm_1_1BMEF_c287f4c0c1ea31b91572ec45351838f1}{
154\index{bdm::BMEF@{bdm::BMEF}!bayes@{bayes}}
155\index{bayes@{bayes}!bdm::BMEF@{bdm::BMEF}}
156\subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}void bdm::BMEF::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
157\label{classbdm_1_1BMEF_c287f4c0c1ea31b91572ec45351838f1}
158
159
160Incremental Bayes rule.
161
162\begin{Desc}
163\item[Parameters:]
164\begin{description}
165\item[{\em dt}]vector of input data \end{description}
166\end{Desc}
167
168
169Implements \hyperlink{classbdm_1_1BM_60b1779a577367c369a932cabd3a6188}{bdm::BM}.
170
171Reimplemented in \hyperlink{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_5bd7da667da183eed1577f11dff0c1f1}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_1e4bf41b61937fd80f34049742e23f95}{bdm::multiBM}.
172
173References bayes().\hypertarget{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{
174\index{bdm::BMEF@{bdm::BMEF}!\_\-copy\_\-@{\_\-copy\_\-}}
175\index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::BMEF@{bdm::BMEF}}
176\subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ bdm::BM::\_\-copy\_\- ()\hspace{0.3cm}{\tt  \mbox{[}inline, virtual, inherited\mbox{]}}}}
177\label{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}
178
179
180Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype:
181
182\begin{Code}\begin{verbatim} BM* _copy_(){return new BM(*this);} 
183\end{verbatim}
184\end{Code}
185
186 
187
188Reimplemented in \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{bdm::ARX}.\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{
189\index{bdm::BMEF@{bdm::BMEF}!logpred@{logpred}}
190\index{logpred@{logpred}!bdm::BMEF@{bdm::BMEF}}
191\subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}virtual double bdm::BM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt  \mbox{[}inline, virtual, inherited\mbox{]}}}}
192\label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}
193
194
195Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
196
197Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}.
198
199Referenced by bdm::BM::logpred\_\-m().
200
201The documentation for this class was generated from the following files:\begin{CompactItemize}
202\item 
203\hyperlink{libEF_8h}{libEF.h}\item 
204libEF.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.