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