| 1 | \hypertarget{classbdm_1_1EKFfull}{ |
|---|
| 2 | \section{bdm::EKFfull Class Reference} |
|---|
| 3 | \label{classbdm_1_1EKFfull}\index{bdm::EKFfull@{bdm::EKFfull}} |
|---|
| 4 | } |
|---|
| 5 | {\tt \#include $<$libKF.h$>$} |
|---|
| 6 | |
|---|
| 7 | Inheritance diagram for bdm::EKFfull:\nopagebreak |
|---|
| 8 | \begin{figure}[H] |
|---|
| 9 | \begin{center} |
|---|
| 10 | \leavevmode |
|---|
| 11 | \includegraphics[width=113pt]{classbdm_1_1EKFfull__inherit__graph} |
|---|
| 12 | \end{center} |
|---|
| 13 | \end{figure} |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | \subsection{Detailed Description} |
|---|
| 17 | Extended \hyperlink{classbdm_1_1Kalman}{Kalman} Filter in full matrices. |
|---|
| 18 | |
|---|
| 19 | An approximation of the exact Bayesian filter with Gaussian noices and non-linear evolutions of their mean. \subsection*{Public Member Functions} |
|---|
| 20 | \begin{CompactItemize} |
|---|
| 21 | \item |
|---|
| 22 | \hypertarget{classbdm_1_1EKFfull_6939c345389abb8b2481457b4cfe1165}{ |
|---|
| 23 | \hyperlink{classbdm_1_1EKFfull_6939c345389abb8b2481457b4cfe1165}{EKFfull} ()} |
|---|
| 24 | \label{classbdm_1_1EKFfull_6939c345389abb8b2481457b4cfe1165} |
|---|
| 25 | |
|---|
| 26 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
|---|
| 27 | \hypertarget{classbdm_1_1EKFfull_78748da361ba61fef162b0d8956d1743}{ |
|---|
| 28 | void \hyperlink{classbdm_1_1EKFfull_78748da361ba61fef162b0d8956d1743}{set\_\-parameters} (\hyperlink{classbdm_1_1diffbifn}{diffbifn} $\ast$pfxu, \hyperlink{classbdm_1_1diffbifn}{diffbifn} $\ast$phxu, const mat Q0, const mat R0)} |
|---|
| 29 | \label{classbdm_1_1EKFfull_78748da361ba61fef162b0d8956d1743} |
|---|
| 30 | |
|---|
| 31 | \begin{CompactList}\small\item\em Set nonlinear functions for mean values and covariance matrices. \item\end{CompactList}\item |
|---|
| 32 | \hypertarget{classbdm_1_1EKFfull_f149ae8e9ce14d9931a7bb2850736699}{ |
|---|
| 33 | void \hyperlink{classbdm_1_1EKFfull_f149ae8e9ce14d9931a7bb2850736699}{bayes} (const vec \&dt)} |
|---|
| 34 | \label{classbdm_1_1EKFfull_f149ae8e9ce14d9931a7bb2850736699} |
|---|
| 35 | |
|---|
| 36 | \begin{CompactList}\small\item\em Here dt = \mbox{[}yt;ut\mbox{]} of appropriate dimensions. \item\end{CompactList}\item |
|---|
| 37 | \hypertarget{classbdm_1_1EKFfull_7562b3d3c17241dab3baf70258742eb2}{ |
|---|
| 38 | void \hyperlink{classbdm_1_1EKFfull_7562b3d3c17241dab3baf70258742eb2}{set\_\-est} (vec mu0, mat P0)} |
|---|
| 39 | \label{classbdm_1_1EKFfull_7562b3d3c17241dab3baf70258742eb2} |
|---|
| 40 | |
|---|
| 41 | \begin{CompactList}\small\item\em set estimates \item\end{CompactList}\item |
|---|
| 42 | \hypertarget{classbdm_1_1EKFfull_6ccc4fa7da522d1c2257156f72291a8a}{ |
|---|
| 43 | const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1EKFfull_6ccc4fa7da522d1c2257156f72291a8a}{\_\-epdf} () const } |
|---|
| 44 | \label{classbdm_1_1EKFfull_6ccc4fa7da522d1c2257156f72291a8a} |
|---|
| 45 | |
|---|
| 46 | \begin{CompactList}\small\item\em dummy! \item\end{CompactList}\item |
|---|
| 47 | \hypertarget{classbdm_1_1EKFfull_3d0e427d4d2fb7ac20358ce629f5d510}{ |
|---|
| 48 | const \hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classfsqmat}{fsqmat} $>$ $\ast$ \textbf{\_\-e} () const } |
|---|
| 49 | \label{classbdm_1_1EKFfull_3d0e427d4d2fb7ac20358ce629f5d510} |
|---|
| 50 | |
|---|
| 51 | \item |
|---|
| 52 | \hypertarget{classbdm_1_1EKFfull_d4f57cb8af64b06c530f528c32596d4d}{ |
|---|
| 53 | const mat \textbf{\_\-R} ()} |
|---|
| 54 | \label{classbdm_1_1EKFfull_d4f57cb8af64b06c530f528c32596d4d} |
|---|
| 55 | |
|---|
| 56 | \end{CompactItemize} |
|---|
| 57 | \begin{Indent}{\bf Constructors}\par |
|---|
| 58 | \begin{CompactItemize} |
|---|
| 59 | \item |
|---|
| 60 | virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{\_\-copy\_\-} () |
|---|
| 61 | \end{CompactItemize} |
|---|
| 62 | \end{Indent} |
|---|
| 63 | \begin{Indent}{\bf Mathematical operations}\par |
|---|
| 64 | \begin{CompactItemize} |
|---|
| 65 | \item |
|---|
| 66 | \hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{ |
|---|
| 67 | virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)} |
|---|
| 68 | \label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc} |
|---|
| 69 | |
|---|
| 70 | \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item |
|---|
| 71 | virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const |
|---|
| 72 | \item |
|---|
| 73 | \hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{ |
|---|
| 74 | vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const } |
|---|
| 75 | \label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae} |
|---|
| 76 | |
|---|
| 77 | \begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item |
|---|
| 78 | \hypertarget{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{ |
|---|
| 79 | virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{epredictor} () const } |
|---|
| 80 | \label{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba} |
|---|
| 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 | \hypertarget{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{ |
|---|
| 84 | virtual \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ \hyperlink{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{predictor} () const } |
|---|
| 85 | \label{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912} |
|---|
| 86 | |
|---|
| 87 | \begin{CompactList}\small\item\em Constructs a conditional density 1-step ahead predictor. \item\end{CompactList}\end{CompactItemize} |
|---|
| 88 | \end{Indent} |
|---|
| 89 | \begin{Indent}{\bf Access to attributes}\par |
|---|
| 90 | \begin{CompactItemize} |
|---|
| 91 | \item |
|---|
| 92 | \hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{ |
|---|
| 93 | const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const } |
|---|
| 94 | \label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c} |
|---|
| 95 | |
|---|
| 96 | \item |
|---|
| 97 | \hypertarget{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{ |
|---|
| 98 | void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} |
|---|
| 99 | \label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96} |
|---|
| 100 | |
|---|
| 101 | \item |
|---|
| 102 | \hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{ |
|---|
| 103 | double \textbf{\_\-ll} () const } |
|---|
| 104 | \label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70} |
|---|
| 105 | |
|---|
| 106 | \item |
|---|
| 107 | \hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{ |
|---|
| 108 | void \textbf{set\_\-evalll} (bool evl0)} |
|---|
| 109 | \label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f} |
|---|
| 110 | |
|---|
| 111 | \end{CompactItemize} |
|---|
| 112 | \end{Indent} |
|---|
| 113 | \subsection*{Public Attributes} |
|---|
| 114 | \begin{CompactItemize} |
|---|
| 115 | \item |
|---|
| 116 | \hypertarget{classbdm_1_1KalmanFull_2defb75e58892615c5f95fd844f3a666}{ |
|---|
| 117 | vec \hyperlink{classbdm_1_1KalmanFull_2defb75e58892615c5f95fd844f3a666}{mu}} |
|---|
| 118 | \label{classbdm_1_1KalmanFull_2defb75e58892615c5f95fd844f3a666} |
|---|
| 119 | |
|---|
| 120 | \begin{CompactList}\small\item\em Mean value of the posterior density. \item\end{CompactList}\item |
|---|
| 121 | \hypertarget{classbdm_1_1KalmanFull_acacd228e100c3e937de575ad2d7cd9c}{ |
|---|
| 122 | mat \hyperlink{classbdm_1_1KalmanFull_acacd228e100c3e937de575ad2d7cd9c}{P}} |
|---|
| 123 | \label{classbdm_1_1KalmanFull_acacd228e100c3e937de575ad2d7cd9c} |
|---|
| 124 | |
|---|
| 125 | \begin{CompactList}\small\item\em Variance of the posterior density. \item\end{CompactList}\item |
|---|
| 126 | \hypertarget{classbdm_1_1KalmanFull_0dba34bfba2aedd8c488692bcd14869b}{ |
|---|
| 127 | bool \textbf{evalll}} |
|---|
| 128 | \label{classbdm_1_1KalmanFull_0dba34bfba2aedd8c488692bcd14869b} |
|---|
| 129 | |
|---|
| 130 | \item |
|---|
| 131 | \hypertarget{classbdm_1_1KalmanFull_363ade67bd5a06c6a45c41e4d8afe11e}{ |
|---|
| 132 | double \textbf{ll}} |
|---|
| 133 | \label{classbdm_1_1KalmanFull_363ade67bd5a06c6a45c41e4d8afe11e} |
|---|
| 134 | |
|---|
| 135 | \end{CompactItemize} |
|---|
| 136 | \subsection*{Protected Attributes} |
|---|
| 137 | \begin{CompactItemize} |
|---|
| 138 | \item |
|---|
| 139 | \hypertarget{classbdm_1_1KalmanFull_427886a66cde0354e041ddef5aa60eab}{ |
|---|
| 140 | int \textbf{dimx}} |
|---|
| 141 | \label{classbdm_1_1KalmanFull_427886a66cde0354e041ddef5aa60eab} |
|---|
| 142 | |
|---|
| 143 | \item |
|---|
| 144 | \hypertarget{classbdm_1_1KalmanFull_2b0399b8904ccb81c2098cc3cc85ff8f}{ |
|---|
| 145 | int \textbf{dimy}} |
|---|
| 146 | \label{classbdm_1_1KalmanFull_2b0399b8904ccb81c2098cc3cc85ff8f} |
|---|
| 147 | |
|---|
| 148 | \item |
|---|
| 149 | \hypertarget{classbdm_1_1KalmanFull_8e886b5d535ba7f9a39e66be34116788}{ |
|---|
| 150 | int \textbf{dimu}} |
|---|
| 151 | \label{classbdm_1_1KalmanFull_8e886b5d535ba7f9a39e66be34116788} |
|---|
| 152 | |
|---|
| 153 | \item |
|---|
| 154 | \hypertarget{classbdm_1_1KalmanFull_a24914cfc0297b9f3885df86e5011733}{ |
|---|
| 155 | mat \textbf{A}} |
|---|
| 156 | \label{classbdm_1_1KalmanFull_a24914cfc0297b9f3885df86e5011733} |
|---|
| 157 | |
|---|
| 158 | \item |
|---|
| 159 | \hypertarget{classbdm_1_1KalmanFull_ef28133db32cc60b710925266c37376d}{ |
|---|
| 160 | mat \textbf{B}} |
|---|
| 161 | \label{classbdm_1_1KalmanFull_ef28133db32cc60b710925266c37376d} |
|---|
| 162 | |
|---|
| 163 | \item |
|---|
| 164 | \hypertarget{classbdm_1_1KalmanFull_89ed156e063e19b32df2218bfaef42cf}{ |
|---|
| 165 | mat \textbf{C}} |
|---|
| 166 | \label{classbdm_1_1KalmanFull_89ed156e063e19b32df2218bfaef42cf} |
|---|
| 167 | |
|---|
| 168 | \item |
|---|
| 169 | \hypertarget{classbdm_1_1KalmanFull_74e9f43b5b4d4a5e012e6178542d3e8f}{ |
|---|
| 170 | mat \textbf{D}} |
|---|
| 171 | \label{classbdm_1_1KalmanFull_74e9f43b5b4d4a5e012e6178542d3e8f} |
|---|
| 172 | |
|---|
| 173 | \item |
|---|
| 174 | \hypertarget{classbdm_1_1KalmanFull_5c1fc8685511d21ba0e1688452105b7c}{ |
|---|
| 175 | mat \textbf{R}} |
|---|
| 176 | \label{classbdm_1_1KalmanFull_5c1fc8685511d21ba0e1688452105b7c} |
|---|
| 177 | |
|---|
| 178 | \item |
|---|
| 179 | \hypertarget{classbdm_1_1KalmanFull_17d9a3316ecf81c149c2c1affb11af58}{ |
|---|
| 180 | mat \textbf{Q}} |
|---|
| 181 | \label{classbdm_1_1KalmanFull_17d9a3316ecf81c149c2c1affb11af58} |
|---|
| 182 | |
|---|
| 183 | \item |
|---|
| 184 | \hypertarget{classbdm_1_1KalmanFull_f7fc60eca2893328d42f92246526d4b9}{ |
|---|
| 185 | mat \textbf{\_\-Pp}} |
|---|
| 186 | \label{classbdm_1_1KalmanFull_f7fc60eca2893328d42f92246526d4b9} |
|---|
| 187 | |
|---|
| 188 | \item |
|---|
| 189 | \hypertarget{classbdm_1_1KalmanFull_b85742b33f95077f360a03ca2de05261}{ |
|---|
| 190 | mat \textbf{\_\-Ry}} |
|---|
| 191 | \label{classbdm_1_1KalmanFull_b85742b33f95077f360a03ca2de05261} |
|---|
| 192 | |
|---|
| 193 | \item |
|---|
| 194 | \hypertarget{classbdm_1_1KalmanFull_09472aa8c06e79944d7637b70bf4e401}{ |
|---|
| 195 | mat \textbf{\_\-iRy}} |
|---|
| 196 | \label{classbdm_1_1KalmanFull_09472aa8c06e79944d7637b70bf4e401} |
|---|
| 197 | |
|---|
| 198 | \item |
|---|
| 199 | \hypertarget{classbdm_1_1KalmanFull_7455b5deee5f14d978c82c5cc9357e29}{ |
|---|
| 200 | mat \textbf{\_\-K}} |
|---|
| 201 | \label{classbdm_1_1KalmanFull_7455b5deee5f14d978c82c5cc9357e29} |
|---|
| 202 | |
|---|
| 203 | \item |
|---|
| 204 | \hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{ |
|---|
| 205 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}} |
|---|
| 206 | \label{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed} |
|---|
| 207 | |
|---|
| 208 | \begin{CompactList}\small\item\em Random variable of the data (optional). \item\end{CompactList}\item |
|---|
| 209 | \hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ |
|---|
| 210 | double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}} |
|---|
| 211 | \label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a} |
|---|
| 212 | |
|---|
| 213 | \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item |
|---|
| 214 | \hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{ |
|---|
| 215 | bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}} |
|---|
| 216 | \label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee} |
|---|
| 217 | |
|---|
| 218 | \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} |
|---|
| 219 | \subsection*{Friends} |
|---|
| 220 | \begin{CompactItemize} |
|---|
| 221 | \item |
|---|
| 222 | \hypertarget{classbdm_1_1KalmanFull_86ba216243ed95bb46d80d88775d16af}{ |
|---|
| 223 | std::ostream \& \hyperlink{classbdm_1_1KalmanFull_86ba216243ed95bb46d80d88775d16af}{operator$<$$<$} (std::ostream \&os, const \hyperlink{classbdm_1_1KalmanFull}{KalmanFull} \&kf)} |
|---|
| 224 | \label{classbdm_1_1KalmanFull_86ba216243ed95bb46d80d88775d16af} |
|---|
| 225 | |
|---|
| 226 | \begin{CompactList}\small\item\em print elements of KF \item\end{CompactList}\end{CompactItemize} |
|---|
| 227 | |
|---|
| 228 | |
|---|
| 229 | \subsection{Member Function Documentation} |
|---|
| 230 | \hypertarget{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{ |
|---|
| 231 | \index{bdm::EKFfull@{bdm::EKFfull}!\_\-copy\_\-@{\_\-copy\_\-}} |
|---|
| 232 | \index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::EKFfull@{bdm::EKFfull}} |
|---|
| 233 | \subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ bdm::BM::\_\-copy\_\- ()\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
|---|
| 234 | \label{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff} |
|---|
| 235 | |
|---|
| 236 | |
|---|
| 237 | Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype: |
|---|
| 238 | |
|---|
| 239 | \begin{Code}\begin{verbatim} BM* _copy_(){return new BM(*this);} |
|---|
| 240 | \end{verbatim} |
|---|
| 241 | \end{Code} |
|---|
| 242 | |
|---|
| 243 | |
|---|
| 244 | |
|---|
| 245 | Reimplemented in \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{bdm::ARX}.\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{ |
|---|
| 246 | \index{bdm::EKFfull@{bdm::EKFfull}!logpred@{logpred}} |
|---|
| 247 | \index{logpred@{logpred}!bdm::EKFfull@{bdm::EKFfull}} |
|---|
| 248 | \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{]}}}} |
|---|
| 249 | \label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0} |
|---|
| 250 | |
|---|
| 251 | |
|---|
| 252 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
|---|
| 253 | |
|---|
| 254 | Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}. |
|---|
| 255 | |
|---|
| 256 | Referenced by bdm::BM::logpred\_\-m(). |
|---|
| 257 | |
|---|
| 258 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
|---|
| 259 | \item |
|---|
| 260 | \hyperlink{libKF_8h}{libKF.h}\item |
|---|
| 261 | libKF.cpp\end{CompactItemize} |
|---|