[172] | 1 | \hypertarget{classEKFCh}{ |
---|
[99] | 2 | \section{EKFCh Class Reference} |
---|
| 3 | \label{classEKFCh}\index{EKFCh@{EKFCh}} |
---|
[172] | 4 | } |
---|
| 5 | Extended \hyperlink{classKalman}{Kalman} Filter in Square root. |
---|
[99] | 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libKF.h$>$} |
---|
| 9 | |
---|
| 10 | Inheritance diagram for EKFCh:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
| 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
| 14 | \includegraphics[width=95pt]{classEKFCh__inherit__graph} |
---|
| 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
| 17 | Collaboration diagram for EKFCh:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
| 21 | \includegraphics[width=400pt]{classEKFCh__coll__graph} |
---|
| 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
[172] | 27 | \hypertarget{classEKFCh_e9e39a9204db3dda88d06e47c1e19064}{ |
---|
| 28 | \hyperlink{classEKFCh_e9e39a9204db3dda88d06e47c1e19064}{EKFCh} (\hyperlink{classRV}{RV} rvx, \hyperlink{classRV}{RV} \hyperlink{classKalman_7501230c2fafa3655887d2da23b3184c}{rvy}, \hyperlink{classRV}{RV} \hyperlink{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498}{rvu})} |
---|
| 29 | \label{classEKFCh_e9e39a9204db3dda88d06e47c1e19064} |
---|
[99] | 30 | |
---|
| 31 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
[172] | 32 | \hypertarget{classEKFCh_0216bed270df59fe65d0d62d41f8257c}{ |
---|
| 33 | void \hyperlink{classEKFCh_0216bed270df59fe65d0d62d41f8257c}{set\_\-parameters} (\hyperlink{classdiffbifn}{diffbifn} $\ast$pfxu, \hyperlink{classdiffbifn}{diffbifn} $\ast$phxu, const \hyperlink{classchmat}{chmat} Q0, const \hyperlink{classchmat}{chmat} R0)} |
---|
| 34 | \label{classEKFCh_0216bed270df59fe65d0d62d41f8257c} |
---|
[99] | 35 | |
---|
| 36 | \begin{CompactList}\small\item\em Set nonlinear functions for mean values and covariance matrices. \item\end{CompactList}\item |
---|
[172] | 37 | \hypertarget{classEKFCh_96f6edda324a0b7ef8b4e86cc7af60c1}{ |
---|
| 38 | void \hyperlink{classEKFCh_96f6edda324a0b7ef8b4e86cc7af60c1}{bayes} (const vec \&dt)} |
---|
| 39 | \label{classEKFCh_96f6edda324a0b7ef8b4e86cc7af60c1} |
---|
[99] | 40 | |
---|
[172] | 41 | \begin{CompactList}\small\item\em Here dt = \mbox{[}yt;ut\mbox{]} of appropriate dimensions. \item\end{CompactList}\item |
---|
| 42 | \hypertarget{classKalmanCh_92fb227287af05c9f0078d523c7c9793}{ |
---|
| 43 | void \hyperlink{classKalmanCh_92fb227287af05c9f0078d523c7c9793}{set\_\-parameters} (const mat \&A0, const mat \&B0, const mat \&C0, const mat \&D0, const \hyperlink{classchmat}{chmat} \&R0, const \hyperlink{classchmat}{chmat} \&Q0)} |
---|
| 44 | \label{classKalmanCh_92fb227287af05c9f0078d523c7c9793} |
---|
[99] | 45 | |
---|
| 46 | \begin{CompactList}\small\item\em Set parameters with check of relevance. \item\end{CompactList}\item |
---|
[172] | 47 | \hypertarget{classKalmanCh_b261b20f6210d4c85131d33302df0adc}{ |
---|
| 48 | void \hyperlink{classKalmanCh_b261b20f6210d4c85131d33302df0adc}{set\_\-est} (const vec \&mu0, const \hyperlink{classchmat}{chmat} \&P0)} |
---|
| 49 | \label{classKalmanCh_b261b20f6210d4c85131d33302df0adc} |
---|
[99] | 50 | |
---|
| 51 | \begin{CompactList}\small\item\em Set estimate values, used e.g. in initialization. \item\end{CompactList}\item |
---|
[172] | 52 | \hypertarget{classKalman_67cccaf1c4dcdcd1df110e15ef326bfe}{ |
---|
| 53 | const \hyperlink{classepdf}{epdf} \& \hyperlink{classKalman_67cccaf1c4dcdcd1df110e15ef326bfe}{\_\-epdf} () const } |
---|
| 54 | \label{classKalman_67cccaf1c4dcdcd1df110e15ef326bfe} |
---|
[99] | 55 | |
---|
[172] | 56 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 57 | \hypertarget{classKalman_980fcd41c6c548c5da7b8b67c8e6da79}{ |
---|
| 58 | mat \& \hyperlink{classKalman_980fcd41c6c548c5da7b8b67c8e6da79}{\_\-\_\-K} ()} |
---|
| 59 | \label{classKalman_980fcd41c6c548c5da7b8b67c8e6da79} |
---|
[99] | 60 | |
---|
| 61 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 62 | \hypertarget{classKalman_ac9540f3850b74d89a5fe4db6fc358ce}{ |
---|
| 63 | vec \hyperlink{classKalman_ac9540f3850b74d89a5fe4db6fc358ce}{\_\-dP} ()} |
---|
| 64 | \label{classKalman_ac9540f3850b74d89a5fe4db6fc358ce} |
---|
[99] | 65 | |
---|
| 66 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 67 | \hypertarget{classBM_0186270f75189677f390fe088a9947e9}{ |
---|
| 68 | virtual void \hyperlink{classBM_0186270f75189677f390fe088a9947e9}{bayesB} (const mat \&Dt)} |
---|
| 69 | \label{classBM_0186270f75189677f390fe088a9947e9} |
---|
[99] | 70 | |
---|
[172] | 71 | \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item |
---|
| 72 | virtual double \hyperlink{classBM_8a8ce6df431689964c41cc6c849cfd06}{logpred} (const vec \&dt) const |
---|
| 73 | \item |
---|
| 74 | \hypertarget{classBM_126bd2595c48e311fc2a7ab72876092a}{ |
---|
| 75 | const \hyperlink{classRV}{RV} \& \hyperlink{classBM_126bd2595c48e311fc2a7ab72876092a}{\_\-rv} () const } |
---|
| 76 | \label{classBM_126bd2595c48e311fc2a7ab72876092a} |
---|
| 77 | |
---|
[99] | 78 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 79 | \hypertarget{classBM_87f4a547d2c29180be88175e5eab9c88}{ |
---|
| 80 | double \hyperlink{classBM_87f4a547d2c29180be88175e5eab9c88}{\_\-ll} () const } |
---|
| 81 | \label{classBM_87f4a547d2c29180be88175e5eab9c88} |
---|
[99] | 82 | |
---|
| 83 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 84 | \hypertarget{classBM_1ffa9f23669aabecc3760c06c6987522}{ |
---|
| 85 | void \hyperlink{classBM_1ffa9f23669aabecc3760c06c6987522}{set\_\-evalll} (bool evl0)} |
---|
| 86 | \label{classBM_1ffa9f23669aabecc3760c06c6987522} |
---|
[99] | 87 | |
---|
[172] | 88 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 89 | virtual \hyperlink{classBM}{BM} $\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-} (bool changerv=false) |
---|
| 90 | \end{CompactItemize} |
---|
[99] | 91 | \subsection*{Protected Attributes} |
---|
| 92 | \begin{CompactItemize} |
---|
| 93 | \item |
---|
[172] | 94 | \hypertarget{classKalmanCh_94ee9da75b0e0f632e4a354988ca3798}{ |
---|
| 95 | mat \hyperlink{classKalmanCh_94ee9da75b0e0f632e4a354988ca3798}{preA}} |
---|
| 96 | \label{classKalmanCh_94ee9da75b0e0f632e4a354988ca3798} |
---|
[99] | 97 | |
---|
| 98 | \begin{CompactList}\small\item\em pre array (triangular matrix) \item\end{CompactList}\item |
---|
[172] | 99 | \hypertarget{classKalmanCh_0d31a26dc72b5846cfe5af3ccb63ac87}{ |
---|
| 100 | mat \hyperlink{classKalmanCh_0d31a26dc72b5846cfe5af3ccb63ac87}{postA}} |
---|
| 101 | \label{classKalmanCh_0d31a26dc72b5846cfe5af3ccb63ac87} |
---|
[99] | 102 | |
---|
| 103 | \begin{CompactList}\small\item\em post array (triangular matrix) \item\end{CompactList}\item |
---|
[172] | 104 | \hypertarget{classKalman_7501230c2fafa3655887d2da23b3184c}{ |
---|
| 105 | \hyperlink{classRV}{RV} \hyperlink{classKalman_7501230c2fafa3655887d2da23b3184c}{rvy}} |
---|
| 106 | \label{classKalman_7501230c2fafa3655887d2da23b3184c} |
---|
[99] | 107 | |
---|
| 108 | \begin{CompactList}\small\item\em Indetifier of output rv. \item\end{CompactList}\item |
---|
[172] | 109 | \hypertarget{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498}{ |
---|
| 110 | \hyperlink{classRV}{RV} \hyperlink{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498}{rvu}} |
---|
| 111 | \label{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498} |
---|
[99] | 112 | |
---|
| 113 | \begin{CompactList}\small\item\em Indetifier of exogeneous rv. \item\end{CompactList}\item |
---|
[172] | 114 | \hypertarget{classKalman_39c8c403b46fa3b8c7da77cb2e3729eb}{ |
---|
| 115 | int \hyperlink{classKalman_39c8c403b46fa3b8c7da77cb2e3729eb}{dimx}} |
---|
| 116 | \label{classKalman_39c8c403b46fa3b8c7da77cb2e3729eb} |
---|
[99] | 117 | |
---|
| 118 | \begin{CompactList}\small\item\em cache of rv.count() \item\end{CompactList}\item |
---|
[172] | 119 | \hypertarget{classKalman_ba17b956df1e38b31fbbc299c8213b6a}{ |
---|
| 120 | int \hyperlink{classKalman_ba17b956df1e38b31fbbc299c8213b6a}{dimy}} |
---|
| 121 | \label{classKalman_ba17b956df1e38b31fbbc299c8213b6a} |
---|
[99] | 122 | |
---|
| 123 | \begin{CompactList}\small\item\em cache of rvy.count() \item\end{CompactList}\item |
---|
[172] | 124 | \hypertarget{classKalman_b0153795a1444b6968a86409c778d9ce}{ |
---|
| 125 | int \hyperlink{classKalman_b0153795a1444b6968a86409c778d9ce}{dimu}} |
---|
| 126 | \label{classKalman_b0153795a1444b6968a86409c778d9ce} |
---|
[99] | 127 | |
---|
| 128 | \begin{CompactList}\small\item\em cache of rvu.count() \item\end{CompactList}\item |
---|
[172] | 129 | \hypertarget{classKalman_5e02efe86ee91e9c74b93b425fe060b9}{ |
---|
| 130 | mat \hyperlink{classKalman_5e02efe86ee91e9c74b93b425fe060b9}{A}} |
---|
| 131 | \label{classKalman_5e02efe86ee91e9c74b93b425fe060b9} |
---|
[99] | 132 | |
---|
| 133 | \begin{CompactList}\small\item\em Matrix A. \item\end{CompactList}\item |
---|
[172] | 134 | \hypertarget{classKalman_dc87704284a6c0bca13bf51f4345a50a}{ |
---|
| 135 | mat \hyperlink{classKalman_dc87704284a6c0bca13bf51f4345a50a}{B}} |
---|
| 136 | \label{classKalman_dc87704284a6c0bca13bf51f4345a50a} |
---|
[99] | 137 | |
---|
| 138 | \begin{CompactList}\small\item\em Matrix B. \item\end{CompactList}\item |
---|
[172] | 139 | \hypertarget{classKalman_86a805cd6515872d1132ad0d6eb5dc13}{ |
---|
| 140 | mat \hyperlink{classKalman_86a805cd6515872d1132ad0d6eb5dc13}{C}} |
---|
| 141 | \label{classKalman_86a805cd6515872d1132ad0d6eb5dc13} |
---|
[99] | 142 | |
---|
| 143 | \begin{CompactList}\small\item\em Matrix C. \item\end{CompactList}\item |
---|
[172] | 144 | \hypertarget{classKalman_d69f774ba3335c970c1c5b1d182f4dd1}{ |
---|
| 145 | mat \hyperlink{classKalman_d69f774ba3335c970c1c5b1d182f4dd1}{D}} |
---|
| 146 | \label{classKalman_d69f774ba3335c970c1c5b1d182f4dd1} |
---|
[99] | 147 | |
---|
| 148 | \begin{CompactList}\small\item\em Matrix D. \item\end{CompactList}\item |
---|
[172] | 149 | \hypertarget{classKalman_9b69015c800eb93f3ee49da23a6f55d9}{ |
---|
| 150 | \hyperlink{classchmat}{chmat} \hyperlink{classKalman_9b69015c800eb93f3ee49da23a6f55d9}{Q}} |
---|
| 151 | \label{classKalman_9b69015c800eb93f3ee49da23a6f55d9} |
---|
[99] | 152 | |
---|
| 153 | \begin{CompactList}\small\item\em Matrix Q in square-root form. \item\end{CompactList}\item |
---|
[172] | 154 | \hypertarget{classKalman_11d171dc0e0ab111c56a70f98b97b3ec}{ |
---|
| 155 | \hyperlink{classchmat}{chmat} \hyperlink{classKalman_11d171dc0e0ab111c56a70f98b97b3ec}{R}} |
---|
| 156 | \label{classKalman_11d171dc0e0ab111c56a70f98b97b3ec} |
---|
[99] | 157 | |
---|
| 158 | \begin{CompactList}\small\item\em Matrix R in square-root form. \item\end{CompactList}\item |
---|
[172] | 159 | \hypertarget{classKalman_5568c74bac67ae6d3b1061dba60c9424}{ |
---|
| 160 | \hyperlink{classenorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ \hyperlink{classKalman_5568c74bac67ae6d3b1061dba60c9424}{est}} |
---|
| 161 | \label{classKalman_5568c74bac67ae6d3b1061dba60c9424} |
---|
[99] | 162 | |
---|
| 163 | \begin{CompactList}\small\item\em posterior density on \$x\_\-t\$ \item\end{CompactList}\item |
---|
[172] | 164 | \hypertarget{classKalman_e580ab06483952bd03f2e651763e184f}{ |
---|
| 165 | \hyperlink{classenorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ \hyperlink{classKalman_e580ab06483952bd03f2e651763e184f}{fy}} |
---|
| 166 | \label{classKalman_e580ab06483952bd03f2e651763e184f} |
---|
[99] | 167 | |
---|
| 168 | \begin{CompactList}\small\item\em preditive density on \$y\_\-t\$ \item\end{CompactList}\item |
---|
[172] | 169 | \hypertarget{classKalman_d422f51467c7a06174af2476d2826132}{ |
---|
| 170 | mat \hyperlink{classKalman_d422f51467c7a06174af2476d2826132}{\_\-K}} |
---|
| 171 | \label{classKalman_d422f51467c7a06174af2476d2826132} |
---|
[99] | 172 | |
---|
[172] | 173 | \begin{CompactList}\small\item\em placeholder for \hyperlink{classKalman}{Kalman} gain \item\end{CompactList}\item |
---|
| 174 | \hypertarget{classKalman_764bbc95238eda11fc81c5ebd0b1dcfd}{ |
---|
| 175 | vec \& \hyperlink{classKalman_764bbc95238eda11fc81c5ebd0b1dcfd}{\_\-yp}} |
---|
| 176 | \label{classKalman_764bbc95238eda11fc81c5ebd0b1dcfd} |
---|
[99] | 177 | |
---|
| 178 | \begin{CompactList}\small\item\em cache of fy.mu \item\end{CompactList}\item |
---|
[172] | 179 | \hypertarget{classKalman_45c9f928d2d62e0c884900fb3380f904}{ |
---|
| 180 | \hyperlink{classchmat}{chmat} \& \hyperlink{classKalman_45c9f928d2d62e0c884900fb3380f904}{\_\-Ry}} |
---|
| 181 | \label{classKalman_45c9f928d2d62e0c884900fb3380f904} |
---|
[99] | 182 | |
---|
| 183 | \begin{CompactList}\small\item\em cache of fy.R \item\end{CompactList}\item |
---|
[172] | 184 | \hypertarget{classKalman_fe803a81d2d847b0b1db3c6b29c18061}{ |
---|
| 185 | vec \& \hyperlink{classKalman_fe803a81d2d847b0b1db3c6b29c18061}{\_\-mu}} |
---|
| 186 | \label{classKalman_fe803a81d2d847b0b1db3c6b29c18061} |
---|
[99] | 187 | |
---|
| 188 | \begin{CompactList}\small\item\em cache of est.mu \item\end{CompactList}\item |
---|
[172] | 189 | \hypertarget{classKalman_9fb808cc94a4c2652e1fb93be9bb7dcf}{ |
---|
| 190 | \hyperlink{classchmat}{chmat} \& \hyperlink{classKalman_9fb808cc94a4c2652e1fb93be9bb7dcf}{\_\-P}} |
---|
| 191 | \label{classKalman_9fb808cc94a4c2652e1fb93be9bb7dcf} |
---|
[99] | 192 | |
---|
| 193 | \begin{CompactList}\small\item\em cache of est.R \item\end{CompactList}\item |
---|
[172] | 194 | \hypertarget{classBM_af00f0612fabe66241dd507188cdbf88}{ |
---|
| 195 | \hyperlink{classRV}{RV} \hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv}} |
---|
| 196 | \label{classBM_af00f0612fabe66241dd507188cdbf88} |
---|
[99] | 197 | |
---|
| 198 | \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item |
---|
[172] | 199 | \hypertarget{classBM_5623fef6572a08c2b53b8c87b82dc979}{ |
---|
| 200 | double \hyperlink{classBM_5623fef6572a08c2b53b8c87b82dc979}{ll}} |
---|
| 201 | \label{classBM_5623fef6572a08c2b53b8c87b82dc979} |
---|
[99] | 202 | |
---|
| 203 | \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item |
---|
[172] | 204 | \hypertarget{classBM_bf6fb59b30141074f8ee1e2f43d03129}{ |
---|
| 205 | bool \hyperlink{classBM_bf6fb59b30141074f8ee1e2f43d03129}{evalll}} |
---|
| 206 | \label{classBM_bf6fb59b30141074f8ee1e2f43d03129} |
---|
[99] | 207 | |
---|
[172] | 208 | \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} |
---|
[99] | 209 | |
---|
| 210 | |
---|
| 211 | \subsection{Detailed Description} |
---|
[172] | 212 | Extended \hyperlink{classKalman}{Kalman} Filter in Square root. |
---|
[99] | 213 | |
---|
| 214 | An approximation of the exact Bayesian filter with Gaussian noices and non-linear evolutions of their mean. |
---|
| 215 | |
---|
[172] | 216 | \subsection{Member Function Documentation} |
---|
| 217 | \hypertarget{classBM_8a8ce6df431689964c41cc6c849cfd06}{ |
---|
| 218 | \index{EKFCh@{EKFCh}!logpred@{logpred}} |
---|
| 219 | \index{logpred@{logpred}!EKFCh@{EKFCh}} |
---|
| 220 | \subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}virtual double BM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
| 221 | \label{classBM_8a8ce6df431689964c41cc6c849cfd06} |
---|
| 222 | |
---|
| 223 | |
---|
| 224 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
| 225 | |
---|
| 226 | Reimplemented in \hyperlink{classARX_e7f9e7823aec9bf7ddc3b42d9b3304c4}{ARX}, \hyperlink{classMixEF_424ca64f36d4e41de7a7e7ae921d35ea}{MixEF}, and \hyperlink{classmultiBM_13e26a61757278981fd8cac9a7ef91eb}{multiBM}.\hypertarget{classBM_eb58c81d6a7b75b05fc6f276eed78887}{ |
---|
| 227 | \index{EKFCh@{EKFCh}!\_\-copy\_\-@{\_\-copy\_\-}} |
---|
| 228 | \index{\_\-copy\_\-@{\_\-copy\_\-}!EKFCh@{EKFCh}} |
---|
| 229 | \subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ BM::\_\-copy\_\- (bool {\em changerv} = {\tt false})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
| 230 | \label{classBM_eb58c81d6a7b75b05fc6f276eed78887} |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | Copy function required in vectors, Arrays of \hyperlink{classBM}{BM} etc. Have to be DELETED manually! Prototype: BM$\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-()}\{\hyperlink{classBM}{BM} Tmp$\ast$=new Tmp(this$\ast$); return Tmp; \} |
---|
| 234 | |
---|
| 235 | Reimplemented in \hyperlink{classARX_d2751057811c6fb8f4ff86e1648bcddc}{ARX}. |
---|
| 236 | |
---|
| 237 | Referenced by MixEF::MixEF(). |
---|
| 238 | |
---|
[99] | 239 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 240 | \item |
---|
[172] | 241 | work/git/mixpp/bdm/estim/\hyperlink{libKF_8h}{libKF.h}\item |
---|
[145] | 242 | work/git/mixpp/bdm/estim/libKF.cpp\end{CompactItemize} |
---|