[261] | 1 | \hypertarget{classbdm_1_1BM}{ |
---|
| 2 | \section{bdm::BM Class Reference} |
---|
| 3 | \label{classbdm_1_1BM}\index{bdm::BM@{bdm::BM}} |
---|
| 4 | } |
---|
| 5 | {\tt \#include $<$libBM.h$>$} |
---|
| 6 | |
---|
[271] | 7 | Inheritance diagram for bdm::BM::\begin{figure}[H] |
---|
[261] | 8 | \begin{center} |
---|
| 9 | \leavevmode |
---|
[271] | 10 | \includegraphics[height=2.50559cm]{classbdm_1_1BM} |
---|
[261] | 11 | \end{center} |
---|
| 12 | \end{figure} |
---|
[270] | 13 | |
---|
| 14 | |
---|
| 15 | \subsection{Detailed Description} |
---|
| 16 | Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities. |
---|
| 17 | |
---|
[261] | 18 | \subsection*{Public Member Functions} |
---|
[270] | 19 | \begin{Indent}{\bf Constructors}\par |
---|
[261] | 20 | \begin{CompactItemize} |
---|
| 21 | \item |
---|
[270] | 22 | \hypertarget{classbdm_1_1BM_db12aecc3135e7868c664e39e7133756}{ |
---|
| 23 | \textbf{BM} ()} |
---|
| 24 | \label{classbdm_1_1BM_db12aecc3135e7868c664e39e7133756} |
---|
[261] | 25 | |
---|
[270] | 26 | \item |
---|
[261] | 27 | \hypertarget{classbdm_1_1BM_241b3701190ff1f729fe873a2eef0055}{ |
---|
[270] | 28 | \textbf{BM} (const \hyperlink{classbdm_1_1BM}{BM} \&B)} |
---|
[261] | 29 | \label{classbdm_1_1BM_241b3701190ff1f729fe873a2eef0055} |
---|
| 30 | |
---|
[270] | 31 | \item |
---|
| 32 | virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{\_\-copy\_\-} () |
---|
| 33 | \end{CompactItemize} |
---|
| 34 | \end{Indent} |
---|
| 35 | \begin{Indent}{\bf Mathematical operations}\par |
---|
| 36 | \begin{CompactItemize} |
---|
| 37 | \item |
---|
[261] | 38 | virtual void \hyperlink{classbdm_1_1BM_60b1779a577367c369a932cabd3a6188}{bayes} (const vec \&dt)=0 |
---|
| 39 | \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item |
---|
| 40 | \hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{ |
---|
| 41 | virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)} |
---|
| 42 | \label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc} |
---|
| 43 | |
---|
| 44 | \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item |
---|
| 45 | virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const |
---|
| 46 | \item |
---|
| 47 | \hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{ |
---|
| 48 | vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const } |
---|
| 49 | \label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae} |
---|
| 50 | |
---|
| 51 | \begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item |
---|
[270] | 52 | \hypertarget{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{ |
---|
| 53 | virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{epredictor} () const } |
---|
| 54 | \label{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba} |
---|
[261] | 55 | |
---|
[270] | 56 | \begin{CompactList}\small\item\em Constructs a predictive density $ f(d_{t+1} |d_{t}, \ldots d_{0}) $. \item\end{CompactList}\item |
---|
| 57 | \hypertarget{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{ |
---|
| 58 | virtual \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ \hyperlink{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{predictor} () const } |
---|
| 59 | \label{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912} |
---|
[261] | 60 | |
---|
[270] | 61 | \begin{CompactList}\small\item\em Constructs a conditional density 1-step ahead predictor. \item\end{CompactList}\end{CompactItemize} |
---|
| 62 | \end{Indent} |
---|
| 63 | \begin{Indent}{\bf Access to attributes}\par |
---|
| 64 | \begin{CompactItemize} |
---|
| 65 | \item |
---|
[269] | 66 | \hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{ |
---|
[270] | 67 | const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const } |
---|
[269] | 68 | \label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c} |
---|
| 69 | |
---|
[270] | 70 | \item |
---|
[269] | 71 | \hypertarget{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{ |
---|
[270] | 72 | void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} |
---|
[269] | 73 | \label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96} |
---|
| 74 | |
---|
[270] | 75 | \item |
---|
[271] | 76 | \hypertarget{classbdm_1_1BM_b38d92f17620813ad872d86e01a26e5e}{ |
---|
| 77 | void \textbf{set\_\-rv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} |
---|
| 78 | \label{classbdm_1_1BM_b38d92f17620813ad872d86e01a26e5e} |
---|
| 79 | |
---|
| 80 | \item |
---|
[261] | 81 | \hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{ |
---|
[270] | 82 | double \textbf{\_\-ll} () const } |
---|
[261] | 83 | \label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70} |
---|
| 84 | |
---|
[270] | 85 | \item |
---|
[261] | 86 | \hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{ |
---|
[270] | 87 | void \textbf{set\_\-evalll} (bool evl0)} |
---|
[261] | 88 | \label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f} |
---|
| 89 | |
---|
[270] | 90 | \item |
---|
[271] | 91 | \hypertarget{classbdm_1_1BM_bb7b0065d6cb722a66b371a8260121e1}{ |
---|
| 92 | virtual const \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{posterior} () const =0} |
---|
| 93 | \label{classbdm_1_1BM_bb7b0065d6cb722a66b371a8260121e1} |
---|
[270] | 94 | |
---|
| 95 | \item |
---|
| 96 | \hypertarget{classbdm_1_1BM_4ed0f8b880e606316ae800f3a011c3a6}{ |
---|
| 97 | virtual const \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \textbf{\_\-e} () const =0} |
---|
| 98 | \label{classbdm_1_1BM_4ed0f8b880e606316ae800f3a011c3a6} |
---|
| 99 | |
---|
[261] | 100 | \end{CompactItemize} |
---|
[270] | 101 | \end{Indent} |
---|
[261] | 102 | \subsection*{Protected Attributes} |
---|
| 103 | \begin{CompactItemize} |
---|
| 104 | \item |
---|
[269] | 105 | \hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{ |
---|
| 106 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}} |
---|
| 107 | \label{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed} |
---|
| 108 | |
---|
| 109 | \begin{CompactList}\small\item\em Random variable of the data (optional). \item\end{CompactList}\item |
---|
[261] | 110 | \hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ |
---|
| 111 | double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}} |
---|
| 112 | \label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a} |
---|
| 113 | |
---|
| 114 | \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item |
---|
| 115 | \hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{ |
---|
| 116 | bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}} |
---|
| 117 | \label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee} |
---|
| 118 | |
---|
| 119 | \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} |
---|
| 120 | |
---|
| 121 | |
---|
[270] | 122 | \subsection{Member Function Documentation} |
---|
| 123 | \hypertarget{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{ |
---|
| 124 | \index{bdm::BM@{bdm::BM}!\_\-copy\_\-@{\_\-copy\_\-}} |
---|
| 125 | \index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::BM@{bdm::BM}} |
---|
| 126 | \subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ bdm::BM::\_\-copy\_\- ()\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
---|
| 127 | \label{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff} |
---|
[261] | 128 | |
---|
| 129 | |
---|
[270] | 130 | Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype: |
---|
[261] | 131 | |
---|
[270] | 132 | \begin{Code}\begin{verbatim} BM* _copy_(){return new BM(*this);} |
---|
| 133 | \end{verbatim} |
---|
| 134 | \end{Code} |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | Reimplemented in \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{bdm::ARX}.\hypertarget{classbdm_1_1BM_60b1779a577367c369a932cabd3a6188}{ |
---|
[261] | 139 | \index{bdm::BM@{bdm::BM}!bayes@{bayes}} |
---|
| 140 | \index{bayes@{bayes}!bdm::BM@{bdm::BM}} |
---|
| 141 | \subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}virtual void bdm::BM::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt \mbox{[}pure virtual\mbox{]}}}} |
---|
| 142 | \label{classbdm_1_1BM_60b1779a577367c369a932cabd3a6188} |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | Incremental Bayes rule. |
---|
| 146 | |
---|
| 147 | \begin{Desc} |
---|
| 148 | \item[Parameters:] |
---|
| 149 | \begin{description} |
---|
| 150 | \item[{\em dt}]vector of input data \end{description} |
---|
| 151 | \end{Desc} |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | Implemented in \hyperlink{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{bdm::ARX}, \hyperlink{classbdm_1_1Kalman_4a39330c14eff8d13179e868a1d1aa8c}{bdm::Kalman$<$ sq\_\-T $>$}, \hyperlink{classbdm_1_1KalmanCh_b41fe5540548100b08e1684c3be767b6}{bdm::KalmanCh}, \hyperlink{classbdm_1_1EKFfull_f149ae8e9ce14d9931a7bb2850736699}{bdm::EKFfull}, \hyperlink{classbdm_1_1EKF_3fb182ecc29b10ca1163cecbf3bcccfa}{bdm::EKF$<$ sq\_\-T $>$}, \hyperlink{classbdm_1_1EKFCh_4c8609c37290b158f88a31dae4047225}{bdm::EKFCh}, \hyperlink{classbdm_1_1PF_638946eea22d4964bf9350286bb4efd8}{bdm::PF}, \hyperlink{classbdm_1_1MPF_286d040770d08bd7ff416cea617b1b14}{bdm::MPF$<$ BM\_\-T $>$}, \hyperlink{classbdm_1_1MixEF_5bd7da667da183eed1577f11dff0c1f1}{bdm::MixEF}, \hyperlink{classbdm_1_1BMEF_c287f4c0c1ea31b91572ec45351838f1}{bdm::BMEF}, \hyperlink{classbdm_1_1multiBM_1e4bf41b61937fd80f34049742e23f95}{bdm::multiBM}, \hyperlink{classbdm_1_1Kalman_4a39330c14eff8d13179e868a1d1aa8c}{bdm::Kalman$<$ ldmat $>$}, \hyperlink{classbdm_1_1Kalman_4a39330c14eff8d13179e868a1d1aa8c}{bdm::Kalman$<$ chmat $>$}, and \hyperlink{classbdm_1_1Kalman_4a39330c14eff8d13179e868a1d1aa8c}{bdm::Kalman$<$ fsqmat $>$}. |
---|
| 155 | |
---|
| 156 | Referenced by bayesB().\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{ |
---|
| 157 | \index{bdm::BM@{bdm::BM}!logpred@{logpred}} |
---|
| 158 | \index{logpred@{logpred}!bdm::BM@{bdm::BM}} |
---|
| 159 | \subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}virtual double bdm::BM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
---|
| 160 | \label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0} |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
| 164 | |
---|
| 165 | Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}. |
---|
| 166 | |
---|
[270] | 167 | Referenced by logpred\_\-m(). |
---|
[261] | 168 | |
---|
| 169 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 170 | \item |
---|
| 171 | \hyperlink{libBM_8h}{libBM.h}\item |
---|
| 172 | libBM.cpp\end{CompactItemize} |
---|