[172] | 1 | \hypertarget{classBM}{ |
---|
[8] | 2 | \section{BM Class Reference} |
---|
| 3 | \label{classBM}\index{BM@{BM}} |
---|
[172] | 4 | } |
---|
[8] | 5 | Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libBM.h$>$} |
---|
| 9 | |
---|
[19] | 10 | Inheritance diagram for BM:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
[8] | 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
[79] | 14 | \includegraphics[width=400pt]{classBM__inherit__graph} |
---|
[8] | 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
[32] | 17 | Collaboration diagram for BM:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
[91] | 21 | \includegraphics[width=37pt]{classBM__coll__graph} |
---|
[32] | 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
[8] | 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
[172] | 27 | \hypertarget{classBM_43d2ad6a6c9f1bcd22fe8906c477e50e}{ |
---|
| 28 | \hyperlink{classBM_43d2ad6a6c9f1bcd22fe8906c477e50e}{BM} (const \hyperlink{classRV}{RV} \&rv0, double ll0=0, bool evalll0=true)} |
---|
| 29 | \label{classBM_43d2ad6a6c9f1bcd22fe8906c477e50e} |
---|
[22] | 30 | |
---|
| 31 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
[172] | 32 | \hypertarget{classBM_e8fc5fae042f2b46d4d3827f9587d47d}{ |
---|
| 33 | \hyperlink{classBM_e8fc5fae042f2b46d4d3827f9587d47d}{BM} (const \hyperlink{classBM}{BM} \&B)} |
---|
| 34 | \label{classBM_e8fc5fae042f2b46d4d3827f9587d47d} |
---|
| 35 | |
---|
| 36 | \begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item |
---|
| 37 | virtual void \hyperlink{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf}{bayes} (const vec \&dt)=0 |
---|
[8] | 38 | \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item |
---|
[172] | 39 | \hypertarget{classBM_0186270f75189677f390fe088a9947e9}{ |
---|
| 40 | virtual void \hyperlink{classBM_0186270f75189677f390fe088a9947e9}{bayesB} (const mat \&Dt)} |
---|
| 41 | \label{classBM_0186270f75189677f390fe088a9947e9} |
---|
[8] | 42 | |
---|
[28] | 43 | \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item |
---|
[172] | 44 | \hypertarget{classBM_8554809fec160bee279bcd5fa14ead5c}{ |
---|
| 45 | virtual const \hyperlink{classepdf}{epdf} \& \hyperlink{classBM_8554809fec160bee279bcd5fa14ead5c}{\_\-epdf} () const =0} |
---|
| 46 | \label{classBM_8554809fec160bee279bcd5fa14ead5c} |
---|
[28] | 47 | |
---|
[172] | 48 | \begin{CompactList}\small\item\em Returns a pointer to the \hyperlink{classepdf}{epdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\item |
---|
| 49 | virtual double \hyperlink{classBM_8a8ce6df431689964c41cc6c849cfd06}{logpred} (const vec \&dt) const |
---|
| 50 | \item |
---|
[180] | 51 | \hypertarget{classBM_cd0660f2a1a344b56ac39802708ff165}{ |
---|
| 52 | vec \hyperlink{classBM_cd0660f2a1a344b56ac39802708ff165}{logpred\_\-m} (const mat \&dt) const } |
---|
| 53 | \label{classBM_cd0660f2a1a344b56ac39802708ff165} |
---|
| 54 | |
---|
| 55 | \begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item |
---|
| 56 | \hypertarget{classBM_a627c5a79cc6f5221b7e09675525e032}{ |
---|
| 57 | virtual \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classBM_a627c5a79cc6f5221b7e09675525e032}{predictor} (const \hyperlink{classRV}{RV} \&\hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv})} |
---|
| 58 | \label{classBM_a627c5a79cc6f5221b7e09675525e032} |
---|
| 59 | |
---|
| 60 | \begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item |
---|
[172] | 61 | \hypertarget{classBM_ca0f02b3b4144e0895cc14f7e0374bdd}{ |
---|
| 62 | virtual \hyperlink{classBM_ca0f02b3b4144e0895cc14f7e0374bdd}{$\sim$BM} ()} |
---|
| 63 | \label{classBM_ca0f02b3b4144e0895cc14f7e0374bdd} |
---|
[32] | 64 | |
---|
[33] | 65 | \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\item |
---|
[172] | 66 | \hypertarget{classBM_126bd2595c48e311fc2a7ab72876092a}{ |
---|
| 67 | const \hyperlink{classRV}{RV} \& \hyperlink{classBM_126bd2595c48e311fc2a7ab72876092a}{\_\-rv} () const } |
---|
| 68 | \label{classBM_126bd2595c48e311fc2a7ab72876092a} |
---|
[33] | 69 | |
---|
| 70 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 71 | \hypertarget{classBM_87f4a547d2c29180be88175e5eab9c88}{ |
---|
| 72 | double \hyperlink{classBM_87f4a547d2c29180be88175e5eab9c88}{\_\-ll} () const } |
---|
| 73 | \label{classBM_87f4a547d2c29180be88175e5eab9c88} |
---|
[33] | 74 | |
---|
[172] | 75 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 76 | \hypertarget{classBM_1ffa9f23669aabecc3760c06c6987522}{ |
---|
| 77 | void \hyperlink{classBM_1ffa9f23669aabecc3760c06c6987522}{set\_\-evalll} (bool evl0)} |
---|
| 78 | \label{classBM_1ffa9f23669aabecc3760c06c6987522} |
---|
| 79 | |
---|
| 80 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 81 | virtual \hyperlink{classBM}{BM} $\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-} (bool changerv=false) |
---|
| 82 | \end{CompactItemize} |
---|
[32] | 83 | \subsection*{Protected Attributes} |
---|
[8] | 84 | \begin{CompactItemize} |
---|
| 85 | \item |
---|
[172] | 86 | \hypertarget{classBM_af00f0612fabe66241dd507188cdbf88}{ |
---|
| 87 | \hyperlink{classRV}{RV} \hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv}} |
---|
| 88 | \label{classBM_af00f0612fabe66241dd507188cdbf88} |
---|
[32] | 89 | |
---|
| 90 | \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item |
---|
[172] | 91 | \hypertarget{classBM_5623fef6572a08c2b53b8c87b82dc979}{ |
---|
| 92 | double \hyperlink{classBM_5623fef6572a08c2b53b8c87b82dc979}{ll}} |
---|
| 93 | \label{classBM_5623fef6572a08c2b53b8c87b82dc979} |
---|
[8] | 94 | |
---|
[28] | 95 | \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item |
---|
[172] | 96 | \hypertarget{classBM_bf6fb59b30141074f8ee1e2f43d03129}{ |
---|
| 97 | bool \hyperlink{classBM_bf6fb59b30141074f8ee1e2f43d03129}{evalll}} |
---|
| 98 | \label{classBM_bf6fb59b30141074f8ee1e2f43d03129} |
---|
[8] | 99 | |
---|
[172] | 100 | \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} |
---|
[8] | 101 | |
---|
[28] | 102 | |
---|
[8] | 103 | \subsection{Detailed Description} |
---|
| 104 | Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. |
---|
| 105 | |
---|
[91] | 106 | |
---|
| 107 | |
---|
[8] | 108 | \subsection{Member Function Documentation} |
---|
[172] | 109 | \hypertarget{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf}{ |
---|
[8] | 110 | \index{BM@{BM}!bayes@{bayes}} |
---|
| 111 | \index{bayes@{bayes}!BM@{BM}} |
---|
[172] | 112 | \subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}virtual void BM::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt \mbox{[}pure virtual\mbox{]}}}} |
---|
| 113 | \label{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf} |
---|
[8] | 114 | |
---|
| 115 | |
---|
| 116 | Incremental Bayes rule. |
---|
| 117 | |
---|
| 118 | \begin{Desc} |
---|
| 119 | \item[Parameters:] |
---|
| 120 | \begin{description} |
---|
[28] | 121 | \item[{\em dt}]vector of input data \end{description} |
---|
[8] | 122 | \end{Desc} |
---|
| 123 | |
---|
| 124 | |
---|
[172] | 125 | Implemented in \hyperlink{classARX_ba82c956ca893826811aefe1e4af465d}{ARX}, \hyperlink{classKalman_7750ffd73f261828a32c18aaeb65c75c}{Kalman$<$ sq\_\-T $>$}, \hyperlink{classKalmanCh_cca758192846940409822b9bd778d4e1}{KalmanCh}, \hyperlink{classEKFfull_8ca46f177e395fa714bbd8bd29ea43e0}{EKFfull}, \hyperlink{classEKF_c79c62c9b3e0b56b3aaa1b6f1d9a7af7}{EKF$<$ sq\_\-T $>$}, \hyperlink{classEKFCh_96f6edda324a0b7ef8b4e86cc7af60c1}{EKFCh}, \hyperlink{classPF_64f636bbd63bea9efd778214e6b631d3}{PF}, \hyperlink{classMPF_55daf8e4b6553dd9f47c692de7931623}{MPF$<$ BM\_\-T $>$}, \hyperlink{classMixEF_d520fb534aa43f3084ff1568ffe7573d}{MixEF}, \hyperlink{classBMEF_52b7719312d545215cca1ff87722a35a}{BMEF}, \hyperlink{classmultiBM_11eeba7e97954e316e959116f90d80e2}{multiBM}, \hyperlink{classEKFfixed_ddf5334bc1207658fd53698fffbac028}{EKFfixed}, \hyperlink{classKalman_7750ffd73f261828a32c18aaeb65c75c}{Kalman$<$ ldmat $>$}, \hyperlink{classKalman_7750ffd73f261828a32c18aaeb65c75c}{Kalman$<$ chmat $>$}, and \hyperlink{classKalman_7750ffd73f261828a32c18aaeb65c75c}{Kalman$<$ fsqmat $>$}. |
---|
[32] | 126 | |
---|
[172] | 127 | Referenced by bayesB().\hypertarget{classBM_8a8ce6df431689964c41cc6c849cfd06}{ |
---|
| 128 | \index{BM@{BM}!logpred@{logpred}} |
---|
| 129 | \index{logpred@{logpred}!BM@{BM}} |
---|
| 130 | \subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}virtual double BM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
---|
| 131 | \label{classBM_8a8ce6df431689964c41cc6c849cfd06} |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
| 135 | |
---|
[180] | 136 | Reimplemented in \hyperlink{classARX_e7f9e7823aec9bf7ddc3b42d9b3304c4}{ARX}, \hyperlink{classMixEF_424ca64f36d4e41de7a7e7ae921d35ea}{MixEF}, and \hyperlink{classmultiBM_13e26a61757278981fd8cac9a7ef91eb}{multiBM}. |
---|
| 137 | |
---|
| 138 | Referenced by logpred\_\-m().\hypertarget{classBM_eb58c81d6a7b75b05fc6f276eed78887}{ |
---|
[172] | 139 | \index{BM@{BM}!\_\-copy\_\-@{\_\-copy\_\-}} |
---|
| 140 | \index{\_\-copy\_\-@{\_\-copy\_\-}!BM@{BM}} |
---|
| 141 | \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\mbox{]}}}} |
---|
| 142 | \label{classBM_eb58c81d6a7b75b05fc6f276eed78887} |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | 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; \} |
---|
| 146 | |
---|
[180] | 147 | Reimplemented in \hyperlink{classARX_5de61fbd4f97fa3216760b1f733f5af0}{ARX}. |
---|
[172] | 148 | |
---|
[180] | 149 | Referenced by MixEF::init(). |
---|
[172] | 150 | |
---|
| 151 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
[8] | 152 | \item |
---|
[172] | 153 | work/git/mixpp/bdm/stat/\hyperlink{libBM_8h}{libBM.h}\item |
---|
| 154 | work/git/mixpp/bdm/stat/libBM.cpp\end{CompactItemize} |
---|