1 | \hypertarget{classbdm_1_1mprod}{ |
---|
2 | \section{bdm::mprod Class Reference} |
---|
3 | \label{classbdm_1_1mprod}\index{bdm::mprod@{bdm::mprod}} |
---|
4 | } |
---|
5 | Chain rule decomposition of \hyperlink{classbdm_1_1epdf}{epdf}. |
---|
6 | |
---|
7 | |
---|
8 | {\tt \#include $<$emix.h$>$} |
---|
9 | |
---|
10 | Inheritance diagram for bdm::mprod:\nopagebreak |
---|
11 | \begin{figure}[H] |
---|
12 | \begin{center} |
---|
13 | \leavevmode |
---|
14 | \includegraphics[width=123pt]{classbdm_1_1mprod__inherit__graph} |
---|
15 | \end{center} |
---|
16 | \end{figure} |
---|
17 | Collaboration diagram for bdm::mprod:\nopagebreak |
---|
18 | \begin{figure}[H] |
---|
19 | \begin{center} |
---|
20 | \leavevmode |
---|
21 | \includegraphics[width=150pt]{classbdm_1_1mprod__coll__graph} |
---|
22 | \end{center} |
---|
23 | \end{figure} |
---|
24 | \subsection*{Public Member Functions} |
---|
25 | \begin{CompactItemize} |
---|
26 | \item |
---|
27 | \hypertarget{classbdm_1_1mprod_680c3e2d95b116c7cfb227c7f2984525}{ |
---|
28 | \hyperlink{classbdm_1_1mprod_680c3e2d95b116c7cfb227c7f2984525}{mprod} (Array$<$ \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ $>$ mFacs)} |
---|
29 | \label{classbdm_1_1mprod_680c3e2d95b116c7cfb227c7f2984525} |
---|
30 | |
---|
31 | \begin{CompactList}\small\item\em Constructor from list of mFacs,. \item\end{CompactList}\item |
---|
32 | \hypertarget{classbdm_1_1mprod_800f21d94c919137608a2fd5c88719e2}{ |
---|
33 | double \hyperlink{classbdm_1_1mprod_800f21d94c919137608a2fd5c88719e2}{evallogcond} (const vec \&val, const vec \&cond)} |
---|
34 | \label{classbdm_1_1mprod_800f21d94c919137608a2fd5c88719e2} |
---|
35 | |
---|
36 | \begin{CompactList}\small\item\em Shortcut for conditioning and evaluation of the internal \hyperlink{classbdm_1_1epdf}{epdf}. In some cases, this operation can be implemented efficiently. \item\end{CompactList}\item |
---|
37 | vec \hyperlink{classbdm_1_1mprod_1a37c2aaba8bde7fce5351c39b6e1168}{samplecond} (const vec \&cond, double \&ll) |
---|
38 | \item |
---|
39 | \hypertarget{classbdm_1_1mprod_b493b5565dc6a5617927421d32697cc6}{ |
---|
40 | mat \textbf{samplecond} (const vec \&cond, vec \&ll, int N)} |
---|
41 | \label{classbdm_1_1mprod_b493b5565dc6a5617927421d32697cc6} |
---|
42 | |
---|
43 | \item |
---|
44 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1compositepdf_c73d39acc4378eee6a63155c3517d3c9}{getrv} (bool checkoverlap=false) |
---|
45 | \begin{CompactList}\small\item\em find common rv, flag \item\end{CompactList}\item |
---|
46 | \hypertarget{classbdm_1_1compositepdf_c71fc2c51f49d797e61f479f543c75ce}{ |
---|
47 | void \hyperlink{classbdm_1_1compositepdf_c71fc2c51f49d797e61f479f543c75ce}{setrvc} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1mpdf_9bcfb45435d30983f436d41c298cbb51}{rv}, \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{rvc})} |
---|
48 | \label{classbdm_1_1compositepdf_c71fc2c51f49d797e61f479f543c75ce} |
---|
49 | |
---|
50 | \begin{CompactList}\small\item\em common rvc of all mpdfs is written to rvc \item\end{CompactList}\item |
---|
51 | virtual vec \hyperlink{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367}{samplecond} (const vec \&cond) |
---|
52 | \begin{CompactList}\small\item\em Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \item\end{CompactList}\item |
---|
53 | virtual mat \hyperlink{classbdm_1_1mpdf_ee26963a637b2ea1fb1933652981e652}{samplecond\_\-m} (const vec \&cond, vec \&ll, int N) |
---|
54 | \begin{CompactList}\small\item\em Returns. \item\end{CompactList}\item |
---|
55 | \hypertarget{classbdm_1_1mpdf_db94784a9aacf74c65c5a014f6743530}{ |
---|
56 | virtual void \hyperlink{classbdm_1_1mpdf_db94784a9aacf74c65c5a014f6743530}{condition} (const vec \&cond)} |
---|
57 | \label{classbdm_1_1mpdf_db94784a9aacf74c65c5a014f6743530} |
---|
58 | |
---|
59 | \begin{CompactList}\small\item\em Update {\tt ep} so that it represents this \hyperlink{classbdm_1_1mpdf}{mpdf} conditioned on {\tt rvc} = cond. \item\end{CompactList}\item |
---|
60 | \hypertarget{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb}{ |
---|
61 | virtual vec \hyperlink{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb}{evallogcond\_\-m} (const mat \&Dt, const vec \&cond)} |
---|
62 | \label{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb} |
---|
63 | |
---|
64 | \begin{CompactList}\small\item\em Matrix version of evallogcond. \item\end{CompactList}\item |
---|
65 | \hypertarget{classbdm_1_1mpdf_b3aba7311038bf990d706a64cab60cf8}{ |
---|
66 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_b3aba7311038bf990d706a64cab60cf8}{\_\-rvc} () const } |
---|
67 | \label{classbdm_1_1mpdf_b3aba7311038bf990d706a64cab60cf8} |
---|
68 | |
---|
69 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
70 | \hypertarget{classbdm_1_1mpdf_222d5280e309c5a053ba73841e98c151}{ |
---|
71 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_222d5280e309c5a053ba73841e98c151}{\_\-rv} () const } |
---|
72 | \label{classbdm_1_1mpdf_222d5280e309c5a053ba73841e98c151} |
---|
73 | |
---|
74 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
75 | \hypertarget{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6}{ |
---|
76 | \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6}{\_\-epdf} ()} |
---|
77 | \label{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6} |
---|
78 | |
---|
79 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
80 | \hypertarget{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80}{ |
---|
81 | \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80}{\_\-e} ()} |
---|
82 | \label{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80} |
---|
83 | |
---|
84 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
85 | \subsection*{Protected Attributes} |
---|
86 | \begin{CompactItemize} |
---|
87 | \item |
---|
88 | \hypertarget{classbdm_1_1mprod_eca722ed1b219727c6c0f8cbc6bf1e51}{ |
---|
89 | Array$<$ \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ $>$ \hyperlink{classbdm_1_1mprod_eca722ed1b219727c6c0f8cbc6bf1e51}{epdfs}} |
---|
90 | \label{classbdm_1_1mprod_eca722ed1b219727c6c0f8cbc6bf1e51} |
---|
91 | |
---|
92 | \begin{CompactList}\small\item\em pointers to epdfs - shortcut to \hyperlink{classbdm_1_1compositepdf_23faf2debc4dde10836393b8c665914a}{mpdfs()}.\hyperlink{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6}{\_\-epdf()} \item\end{CompactList}\item |
---|
93 | \hypertarget{classbdm_1_1mprod_acf679b3b1d48629c5a042d9ac0d973f}{ |
---|
94 | Array$<$ \hyperlink{classbdm_1_1datalink__m2m}{datalink\_\-m2m} $\ast$ $>$ \hyperlink{classbdm_1_1mprod_acf679b3b1d48629c5a042d9ac0d973f}{dls}} |
---|
95 | \label{classbdm_1_1mprod_acf679b3b1d48629c5a042d9ac0d973f} |
---|
96 | |
---|
97 | \begin{CompactList}\small\item\em Data link for each mpdfs. \item\end{CompactList}\item |
---|
98 | \hypertarget{classbdm_1_1compositepdf_7ca3cd8ed92a7154f5b9ff13b1e9d52a}{ |
---|
99 | int \hyperlink{classbdm_1_1compositepdf_7ca3cd8ed92a7154f5b9ff13b1e9d52a}{n}} |
---|
100 | \label{classbdm_1_1compositepdf_7ca3cd8ed92a7154f5b9ff13b1e9d52a} |
---|
101 | |
---|
102 | \begin{CompactList}\small\item\em Number of mpdfs in the composite. \item\end{CompactList}\item |
---|
103 | \hypertarget{classbdm_1_1compositepdf_23faf2debc4dde10836393b8c665914a}{ |
---|
104 | Array$<$ \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ $>$ \hyperlink{classbdm_1_1compositepdf_23faf2debc4dde10836393b8c665914a}{mpdfs}} |
---|
105 | \label{classbdm_1_1compositepdf_23faf2debc4dde10836393b8c665914a} |
---|
106 | |
---|
107 | \begin{CompactList}\small\item\em Elements of composition. \item\end{CompactList}\item |
---|
108 | \hypertarget{classbdm_1_1mpdf_9bcfb45435d30983f436d41c298cbb51}{ |
---|
109 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_9bcfb45435d30983f436d41c298cbb51}{rv}} |
---|
110 | \label{classbdm_1_1mpdf_9bcfb45435d30983f436d41c298cbb51} |
---|
111 | |
---|
112 | \begin{CompactList}\small\item\em modeled random variable \item\end{CompactList}\item |
---|
113 | \hypertarget{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{ |
---|
114 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{rvc}} |
---|
115 | \label{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288} |
---|
116 | |
---|
117 | \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item |
---|
118 | \hypertarget{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0}{ |
---|
119 | \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0}{ep}} |
---|
120 | \label{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0} |
---|
121 | |
---|
122 | \begin{CompactList}\small\item\em pointer to internal \hyperlink{classbdm_1_1epdf}{epdf} \item\end{CompactList}\end{CompactItemize} |
---|
123 | |
---|
124 | |
---|
125 | \subsection{Detailed Description} |
---|
126 | Chain rule decomposition of \hyperlink{classbdm_1_1epdf}{epdf}. |
---|
127 | |
---|
128 | Probability density in the form of Chain-rule decomposition: $\backslash$\mbox{[} f(x\_\-1,x\_\-2,x\_\-3) = f(x\_\-1$|$x\_\-2,x\_\-3)f(x\_\-2,x\_\-3)f(x\_\-3) $\backslash$\mbox{]} Note that |
---|
129 | |
---|
130 | \subsection{Member Function Documentation} |
---|
131 | \hypertarget{classbdm_1_1mprod_1a37c2aaba8bde7fce5351c39b6e1168}{ |
---|
132 | \index{bdm::mprod@{bdm::mprod}!samplecond@{samplecond}} |
---|
133 | \index{samplecond@{samplecond}!bdm::mprod@{bdm::mprod}} |
---|
134 | \subsubsection[samplecond]{\setlength{\rightskip}{0pt plus 5cm}vec bdm::mprod::samplecond (const vec \& {\em cond}, \/ double \& {\em ll})\hspace{0.3cm}{\tt \mbox{[}inline\mbox{]}}}} |
---|
135 | \label{classbdm_1_1mprod_1a37c2aaba8bde7fce5351c39b6e1168} |
---|
136 | |
---|
137 | |
---|
138 | |
---|
139 | |
---|
140 | Ugly hack to help to discover if mpfs are not in proper order. Correct solution = check that explicitely. |
---|
141 | |
---|
142 | References bdm::RV::count(), dls, epdfs, bdm::compositepdf::mpdfs, bdm::compositepdf::n, and bdm::mpdf::rv.\hypertarget{classbdm_1_1compositepdf_c73d39acc4378eee6a63155c3517d3c9}{ |
---|
143 | \index{bdm::mprod@{bdm::mprod}!getrv@{getrv}} |
---|
144 | \index{getrv@{getrv}!bdm::mprod@{bdm::mprod}} |
---|
145 | \subsubsection[getrv]{\setlength{\rightskip}{0pt plus 5cm}{\bf RV} bdm::compositepdf::getrv (bool {\em checkoverlap} = {\tt false})\hspace{0.3cm}{\tt \mbox{[}inherited\mbox{]}}}} |
---|
146 | \label{classbdm_1_1compositepdf_c73d39acc4378eee6a63155c3517d3c9} |
---|
147 | |
---|
148 | |
---|
149 | find common rv, flag |
---|
150 | |
---|
151 | \begin{Desc} |
---|
152 | \item[Parameters:] |
---|
153 | \begin{description} |
---|
154 | \item[{\em checkoverlap}]modifies whether overlaps are acceptable \end{description} |
---|
155 | \end{Desc} |
---|
156 | |
---|
157 | |
---|
158 | References bdm::RV::add(), bdm::compositepdf::mpdfs, and bdm::compositepdf::n.\hypertarget{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367}{ |
---|
159 | \index{bdm::mprod@{bdm::mprod}!samplecond@{samplecond}} |
---|
160 | \index{samplecond@{samplecond}!bdm::mprod@{bdm::mprod}} |
---|
161 | \subsubsection[samplecond]{\setlength{\rightskip}{0pt plus 5cm}virtual vec bdm::mpdf::samplecond (const vec \& {\em cond})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
162 | \label{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367} |
---|
163 | |
---|
164 | |
---|
165 | Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. |
---|
166 | |
---|
167 | \begin{Desc} |
---|
168 | \item[Parameters:] |
---|
169 | \begin{description} |
---|
170 | \item[{\em cond}]is numeric value of {\tt rv} \end{description} |
---|
171 | \end{Desc} |
---|
172 | |
---|
173 | |
---|
174 | References bdm::mpdf::condition(), bdm::mpdf::ep, and bdm::epdf::sample(). |
---|
175 | |
---|
176 | Referenced by bdm::MPF$<$ BM\_\-T $>$::bayes(), bdm::PF::bayes(), and bdm::ArxDS::step().\hypertarget{classbdm_1_1mpdf_ee26963a637b2ea1fb1933652981e652}{ |
---|
177 | \index{bdm::mprod@{bdm::mprod}!samplecond\_\-m@{samplecond\_\-m}} |
---|
178 | \index{samplecond\_\-m@{samplecond\_\-m}!bdm::mprod@{bdm::mprod}} |
---|
179 | \subsubsection[samplecond\_\-m]{\setlength{\rightskip}{0pt plus 5cm}virtual mat bdm::mpdf::samplecond\_\-m (const vec \& {\em cond}, \/ vec \& {\em ll}, \/ int {\em N})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
180 | \label{classbdm_1_1mpdf_ee26963a637b2ea1fb1933652981e652} |
---|
181 | |
---|
182 | |
---|
183 | Returns. |
---|
184 | |
---|
185 | \begin{Desc} |
---|
186 | \item[Parameters:] |
---|
187 | \begin{description} |
---|
188 | \item[{\em N}]samples from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \item[{\em cond}]is numeric value of {\tt rv} \item[{\em ll}]is a return value of log-likelihood of the sample. \end{description} |
---|
189 | \end{Desc} |
---|
190 | |
---|
191 | |
---|
192 | References bdm::mpdf::condition(), bdm::RV::count(), bdm::mpdf::ep, bdm::epdf::evallog(), bdm::mpdf::rv, and bdm::epdf::sample(). |
---|
193 | |
---|
194 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
---|
195 | \item |
---|
196 | \hyperlink{emix_8h}{emix.h}\end{CompactItemize} |
---|