1 | \hypertarget{classbdm_1_1BMEF}{ |
---|
2 | \section{bdm::BMEF Class Reference} |
---|
3 | \label{classbdm_1_1BMEF}\index{bdm::BMEF@{bdm::BMEF}} |
---|
4 | } |
---|
5 | Estimator for Exponential family. |
---|
6 | |
---|
7 | |
---|
8 | {\tt \#include $<$libEF.h$>$} |
---|
9 | |
---|
10 | Inheritance diagram for bdm::BMEF:\nopagebreak |
---|
11 | \begin{figure}[H] |
---|
12 | \begin{center} |
---|
13 | \leavevmode |
---|
14 | \includegraphics[width=147pt]{classbdm_1_1BMEF__inherit__graph} |
---|
15 | \end{center} |
---|
16 | \end{figure} |
---|
17 | Collaboration diagram for bdm::BMEF:\nopagebreak |
---|
18 | \begin{figure}[H] |
---|
19 | \begin{center} |
---|
20 | \leavevmode |
---|
21 | \includegraphics[width=75pt]{classbdm_1_1BMEF__coll__graph} |
---|
22 | \end{center} |
---|
23 | \end{figure} |
---|
24 | \subsection*{Public Member Functions} |
---|
25 | \begin{CompactItemize} |
---|
26 | \item |
---|
27 | \hypertarget{classbdm_1_1BMEF_73bccd1d8142d4d330e35637ca30decc}{ |
---|
28 | \hyperlink{classbdm_1_1BMEF_73bccd1d8142d4d330e35637ca30decc}{BMEF} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}, double frg0=1.0)} |
---|
29 | \label{classbdm_1_1BMEF_73bccd1d8142d4d330e35637ca30decc} |
---|
30 | |
---|
31 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
32 | \hypertarget{classbdm_1_1BMEF_9662379513101405e159e76717104e62}{ |
---|
33 | \hyperlink{classbdm_1_1BMEF_9662379513101405e159e76717104e62}{BMEF} (const \hyperlink{classbdm_1_1BMEF}{BMEF} \&B)} |
---|
34 | \label{classbdm_1_1BMEF_9662379513101405e159e76717104e62} |
---|
35 | |
---|
36 | \begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item |
---|
37 | \hypertarget{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051}{ |
---|
38 | virtual void \hyperlink{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051}{set\_\-statistics} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$BM0)} |
---|
39 | \label{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051} |
---|
40 | |
---|
41 | \begin{CompactList}\small\item\em get statistics from another model \item\end{CompactList}\item |
---|
42 | \hypertarget{classbdm_1_1BMEF_bf58deb99af2a6cc674f13ff90300de6}{ |
---|
43 | virtual void \hyperlink{classbdm_1_1BMEF_bf58deb99af2a6cc674f13ff90300de6}{bayes} (const vec \&data, const double w)} |
---|
44 | \label{classbdm_1_1BMEF_bf58deb99af2a6cc674f13ff90300de6} |
---|
45 | |
---|
46 | \begin{CompactList}\small\item\em Weighted update of sufficient statistics (Bayes rule). \item\end{CompactList}\item |
---|
47 | void \hyperlink{classbdm_1_1BMEF_c287f4c0c1ea31b91572ec45351838f1}{bayes} (const vec \&dt) |
---|
48 | \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item |
---|
49 | \hypertarget{classbdm_1_1BMEF_b2916a2e71a958665054473124d5e749}{ |
---|
50 | virtual void \hyperlink{classbdm_1_1BMEF_b2916a2e71a958665054473124d5e749}{flatten} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$B)} |
---|
51 | \label{classbdm_1_1BMEF_b2916a2e71a958665054473124d5e749} |
---|
52 | |
---|
53 | \begin{CompactList}\small\item\em Flatten the posterior according to the given \hyperlink{classbdm_1_1BMEF}{BMEF} (of the same type!). \item\end{CompactList}\item |
---|
54 | \hypertarget{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{ |
---|
55 | \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$ \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{\_\-copy\_\-} (bool changerv=false)} |
---|
56 | \label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6} |
---|
57 | |
---|
58 | \begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \item\end{CompactList}\item |
---|
59 | \hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{ |
---|
60 | virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)} |
---|
61 | \label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc} |
---|
62 | |
---|
63 | \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item |
---|
64 | \hypertarget{classbdm_1_1BM_963258c4c2dd05be001003b19aceefef}{ |
---|
65 | virtual const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1BM_963258c4c2dd05be001003b19aceefef}{\_\-epdf} () const =0} |
---|
66 | \label{classbdm_1_1BM_963258c4c2dd05be001003b19aceefef} |
---|
67 | |
---|
68 | \begin{CompactList}\small\item\em Returns a reference to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. \item\end{CompactList}\item |
---|
69 | \hypertarget{classbdm_1_1BM_4ed0f8b880e606316ae800f3a011c3a6}{ |
---|
70 | virtual const \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1BM_4ed0f8b880e606316ae800f3a011c3a6}{\_\-e} () const =0} |
---|
71 | \label{classbdm_1_1BM_4ed0f8b880e606316ae800f3a011c3a6} |
---|
72 | |
---|
73 | \begin{CompactList}\small\item\em Returns a pointer to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\item |
---|
74 | virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const |
---|
75 | \item |
---|
76 | \hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{ |
---|
77 | vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const } |
---|
78 | \label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae} |
---|
79 | |
---|
80 | \begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item |
---|
81 | \hypertarget{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}{ |
---|
82 | virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}{predictor} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}) const } |
---|
83 | \label{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c} |
---|
84 | |
---|
85 | \begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item |
---|
86 | \hypertarget{classbdm_1_1BM_40a3c891996391e3135518053a917793}{ |
---|
87 | const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BM_40a3c891996391e3135518053a917793}{\_\-rv} () const } |
---|
88 | \label{classbdm_1_1BM_40a3c891996391e3135518053a917793} |
---|
89 | |
---|
90 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
91 | \hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{ |
---|
92 | double \hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const } |
---|
93 | \label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70} |
---|
94 | |
---|
95 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
96 | \hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{ |
---|
97 | void \hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)} |
---|
98 | \label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f} |
---|
99 | |
---|
100 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
101 | \subsection*{Protected Attributes} |
---|
102 | \begin{CompactItemize} |
---|
103 | \item |
---|
104 | \hypertarget{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}{ |
---|
105 | double \hyperlink{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}{frg}} |
---|
106 | \label{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64} |
---|
107 | |
---|
108 | \begin{CompactList}\small\item\em forgetting factor \item\end{CompactList}\item |
---|
109 | \hypertarget{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865}{ |
---|
110 | double \hyperlink{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865}{last\_\-lognc}} |
---|
111 | \label{classbdm_1_1BMEF_06e7b3ac03e10017d4288c76888e2865} |
---|
112 | |
---|
113 | \begin{CompactList}\small\item\em cached value of lognc() in the previous step (used in evaluation of {\tt ll} ) \item\end{CompactList}\item |
---|
114 | \hypertarget{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{ |
---|
115 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}} |
---|
116 | \label{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca} |
---|
117 | |
---|
118 | \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item |
---|
119 | \hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ |
---|
120 | double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}} |
---|
121 | \label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a} |
---|
122 | |
---|
123 | \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item |
---|
124 | \hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{ |
---|
125 | bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}} |
---|
126 | \label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee} |
---|
127 | |
---|
128 | \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} |
---|
129 | |
---|
130 | |
---|
131 | \subsection{Detailed Description} |
---|
132 | Estimator for Exponential family. |
---|
133 | |
---|
134 | \subsection{Member Function Documentation} |
---|
135 | \hypertarget{classbdm_1_1BMEF_c287f4c0c1ea31b91572ec45351838f1}{ |
---|
136 | \index{bdm::BMEF@{bdm::BMEF}!bayes@{bayes}} |
---|
137 | \index{bayes@{bayes}!bdm::BMEF@{bdm::BMEF}} |
---|
138 | \subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}void bdm::BMEF::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt \mbox{[}virtual\mbox{]}}}} |
---|
139 | \label{classbdm_1_1BMEF_c287f4c0c1ea31b91572ec45351838f1} |
---|
140 | |
---|
141 | |
---|
142 | Incremental Bayes rule. |
---|
143 | |
---|
144 | \begin{Desc} |
---|
145 | \item[Parameters:] |
---|
146 | \begin{description} |
---|
147 | \item[{\em dt}]vector of input data \end{description} |
---|
148 | \end{Desc} |
---|
149 | |
---|
150 | |
---|
151 | Implements \hyperlink{classbdm_1_1BM_60b1779a577367c369a932cabd3a6188}{bdm::BM}. |
---|
152 | |
---|
153 | Reimplemented in \hyperlink{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_5bd7da667da183eed1577f11dff0c1f1}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_1e4bf41b61937fd80f34049742e23f95}{bdm::multiBM}. |
---|
154 | |
---|
155 | References bayes().\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{ |
---|
156 | \index{bdm::BMEF@{bdm::BMEF}!logpred@{logpred}} |
---|
157 | \index{logpred@{logpred}!bdm::BMEF@{bdm::BMEF}} |
---|
158 | \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{]}}}} |
---|
159 | \label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0} |
---|
160 | |
---|
161 | |
---|
162 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
163 | |
---|
164 | Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}. |
---|
165 | |
---|
166 | Referenced by bdm::BM::logpred\_\-m(). |
---|
167 | |
---|
168 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
169 | \item |
---|
170 | \hyperlink{libEF_8h}{libEF.h}\item |
---|
171 | libEF.cpp\end{CompactItemize} |
---|