[172] | 1 | \hypertarget{classmprod}{ |
---|
| 2 | \section{mprod Class Reference} |
---|
| 3 | \label{classmprod}\index{mprod@{mprod}} |
---|
| 4 | } |
---|
| 5 | Chain rule decomposition of \hyperlink{classepdf}{epdf}. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$emix.h$>$} |
---|
| 9 | |
---|
| 10 | Inheritance diagram for mprod:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
| 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
[180] | 14 | \includegraphics[width=91pt]{classmprod__inherit__graph} |
---|
[172] | 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
| 17 | Collaboration diagram for mprod:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
[180] | 21 | \includegraphics[width=102pt]{classmprod__coll__graph} |
---|
[172] | 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
[180] | 27 | \hypertarget{classmprod_419b303581a91ad85200bdcb4b3186f4}{ |
---|
| 28 | \hyperlink{classmprod_419b303581a91ad85200bdcb4b3186f4}{mprod} (Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ mFacs)} |
---|
| 29 | \label{classmprod_419b303581a91ad85200bdcb4b3186f4} |
---|
[172] | 30 | |
---|
| 31 | \begin{CompactList}\small\item\em Constructor from list of mFacs, Additional parameter overlap is left for future use. Do not set to true for \hyperlink{classmprod}{mprod}. \item\end{CompactList}\item |
---|
| 32 | \hypertarget{classmprod_c15df5d0c7bb9dc82dd78f037b2550a8}{ |
---|
| 33 | double \textbf{evalpdflog} (const vec \&val) const } |
---|
| 34 | \label{classmprod_c15df5d0c7bb9dc82dd78f037b2550a8} |
---|
| 35 | |
---|
| 36 | \item |
---|
| 37 | vec \hyperlink{classmprod_a48887eb8738a9e5550bfc38eb8e9d68}{samplecond} (const vec \&cond, double \&ll) |
---|
| 38 | \begin{CompactList}\small\item\em Returns the required moment of the \hyperlink{classepdf}{epdf}. \item\end{CompactList}\item |
---|
| 39 | mat \hyperlink{classmprod_e171c40e210539c2af01d6237785620b}{samplecond} (const vec \&cond, vec \&ll, int N) |
---|
| 40 | \begin{CompactList}\small\item\em Returns. \item\end{CompactList}\item |
---|
[180] | 41 | \hypertarget{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93}{ |
---|
| 42 | \hyperlink{classRV}{RV} \textbf{getrv} (bool checkoverlap=false)} |
---|
| 43 | \label{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93} |
---|
| 44 | |
---|
| 45 | \item |
---|
| 46 | \hypertarget{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac}{ |
---|
| 47 | void \textbf{setrvc} (const \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv}, \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc})} |
---|
| 48 | \label{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac} |
---|
| 49 | |
---|
| 50 | \item |
---|
| 51 | \hypertarget{classcompositepdf_08958c8f76d65de94ecc37b8d90bc77a}{ |
---|
| 52 | void \textbf{setindices} (const \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv})} |
---|
| 53 | \label{classcompositepdf_08958c8f76d65de94ecc37b8d90bc77a} |
---|
| 54 | |
---|
| 55 | \item |
---|
| 56 | \hypertarget{classcompositepdf_3bd4ada95f381ea6c4cff2dc86e957c4}{ |
---|
| 57 | void \textbf{setrvcinrv} (const \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc}, Array$<$ ivec $>$ \&rvcind)} |
---|
| 58 | \label{classcompositepdf_3bd4ada95f381ea6c4cff2dc86e957c4} |
---|
| 59 | |
---|
| 60 | \item |
---|
[172] | 61 | \hypertarget{classmpdf_0f95a0cc6ab40611f46804682446ed83}{ |
---|
| 62 | virtual void \hyperlink{classmpdf_0f95a0cc6ab40611f46804682446ed83}{condition} (const vec \&cond)} |
---|
| 63 | \label{classmpdf_0f95a0cc6ab40611f46804682446ed83} |
---|
| 64 | |
---|
| 65 | \begin{CompactList}\small\item\em Update {\tt ep} so that it represents this \hyperlink{classmpdf}{mpdf} conditioned on {\tt rvc} = cond. \item\end{CompactList}\item |
---|
| 66 | \hypertarget{classmpdf_80b738ece5bd4f8c4edaee4b38906f91}{ |
---|
| 67 | virtual double \hyperlink{classmpdf_80b738ece5bd4f8c4edaee4b38906f91}{evalcond} (const vec \&dt, const vec \&cond)} |
---|
| 68 | \label{classmpdf_80b738ece5bd4f8c4edaee4b38906f91} |
---|
| 69 | |
---|
| 70 | \begin{CompactList}\small\item\em Shortcut for conditioning and evaluation of the internal \hyperlink{classepdf}{epdf}. In some cases, this operation can be implemented efficiently. \item\end{CompactList}\item |
---|
| 71 | \hypertarget{classmpdf_ec9c850305984582548e8deb64f0ffe8}{ |
---|
| 72 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_ec9c850305984582548e8deb64f0ffe8}{\_\-rvc} ()} |
---|
| 73 | \label{classmpdf_ec9c850305984582548e8deb64f0ffe8} |
---|
| 74 | |
---|
| 75 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 76 | \hypertarget{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32}{ |
---|
| 77 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32}{\_\-rv} ()} |
---|
| 78 | \label{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32} |
---|
| 79 | |
---|
| 80 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 81 | \hypertarget{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{ |
---|
| 82 | \hyperlink{classepdf}{epdf} \& \hyperlink{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{\_\-epdf} ()} |
---|
| 83 | \label{classmpdf_e17780ee5b2cfe05922a6c56af1462f8} |
---|
| 84 | |
---|
| 85 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
| 86 | \subsection*{Protected Attributes} |
---|
| 87 | \begin{CompactItemize} |
---|
| 88 | \item |
---|
| 89 | \hypertarget{classmprod_0883ce383e8475546df138719918f70e}{ |
---|
| 90 | Array$<$ \hyperlink{classepdf}{epdf} $\ast$ $>$ \textbf{epdfs}} |
---|
| 91 | \label{classmprod_0883ce383e8475546df138719918f70e} |
---|
| 92 | |
---|
| 93 | \item |
---|
[180] | 94 | \hypertarget{classmprod_cc85192d8abc01832937ed8b62e363a6}{ |
---|
| 95 | Array$<$ ivec $>$ \hyperlink{classmprod_cc85192d8abc01832937ed8b62e363a6}{rvcinds}} |
---|
| 96 | \label{classmprod_cc85192d8abc01832937ed8b62e363a6} |
---|
[172] | 97 | |
---|
[180] | 98 | \begin{CompactList}\small\item\em Indeces of rvc in common rvc. \item\end{CompactList}\item |
---|
| 99 | \hypertarget{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}{ |
---|
| 100 | int \hyperlink{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}{n}} |
---|
| 101 | \label{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f} |
---|
[172] | 102 | |
---|
[180] | 103 | \begin{CompactList}\small\item\em Number of mpdfs in the composite. \item\end{CompactList}\item |
---|
| 104 | \hypertarget{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{ |
---|
| 105 | Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ \hyperlink{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{mpdfs}} |
---|
| 106 | \label{classcompositepdf_637877061b917a16a0421bb5c4cd480d} |
---|
| 107 | |
---|
| 108 | \begin{CompactList}\small\item\em Elements of composition. \item\end{CompactList}\item |
---|
| 109 | \hypertarget{classcompositepdf_4d4a8269f9faefeca8cdc251a5a29a7f}{ |
---|
| 110 | Array$<$ ivec $>$ \hyperlink{classcompositepdf_4d4a8269f9faefeca8cdc251a5a29a7f}{rvsinrv}} |
---|
| 111 | \label{classcompositepdf_4d4a8269f9faefeca8cdc251a5a29a7f} |
---|
| 112 | |
---|
[172] | 113 | \begin{CompactList}\small\item\em Indeces of rvs in common rv. \item\end{CompactList}\item |
---|
[180] | 114 | \hypertarget{classcompositepdf_3df07bb5e3ed36a3119b145043296676}{ |
---|
| 115 | Array$<$ ivec $>$ \hyperlink{classcompositepdf_3df07bb5e3ed36a3119b145043296676}{rvcsinrv}} |
---|
| 116 | \label{classcompositepdf_3df07bb5e3ed36a3119b145043296676} |
---|
[172] | 117 | |
---|
| 118 | \begin{CompactList}\small\item\em Indeces of rvc in common rv. \item\end{CompactList}\item |
---|
| 119 | \hypertarget{classmpdf_f6687c07ff07d47812dd565368ca59eb}{ |
---|
| 120 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv}} |
---|
| 121 | \label{classmpdf_f6687c07ff07d47812dd565368ca59eb} |
---|
| 122 | |
---|
| 123 | \begin{CompactList}\small\item\em modeled random variable \item\end{CompactList}\item |
---|
| 124 | \hypertarget{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{ |
---|
| 125 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc}} |
---|
| 126 | \label{classmpdf_acb7dda792b3cd5576f39fa3129abbab} |
---|
| 127 | |
---|
| 128 | \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item |
---|
| 129 | \hypertarget{classmpdf_7aa894208a32f3487827df6d5054424c}{ |
---|
| 130 | \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classmpdf_7aa894208a32f3487827df6d5054424c}{ep}} |
---|
| 131 | \label{classmpdf_7aa894208a32f3487827df6d5054424c} |
---|
| 132 | |
---|
| 133 | \begin{CompactList}\small\item\em pointer to internal \hyperlink{classepdf}{epdf} \item\end{CompactList}\end{CompactItemize} |
---|
| 134 | |
---|
| 135 | |
---|
| 136 | \subsection{Detailed Description} |
---|
| 137 | Chain rule decomposition of \hyperlink{classepdf}{epdf}. |
---|
| 138 | |
---|
| 139 | 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 |
---|
| 140 | |
---|
| 141 | \subsection{Member Function Documentation} |
---|
| 142 | \hypertarget{classmprod_a48887eb8738a9e5550bfc38eb8e9d68}{ |
---|
| 143 | \index{mprod@{mprod}!samplecond@{samplecond}} |
---|
| 144 | \index{samplecond@{samplecond}!mprod@{mprod}} |
---|
| 145 | \subsubsection[samplecond]{\setlength{\rightskip}{0pt plus 5cm}vec mprod::samplecond (const vec \& {\em cond}, \/ double \& {\em ll})\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
---|
| 146 | \label{classmprod_a48887eb8738a9e5550bfc38eb8e9d68} |
---|
| 147 | |
---|
| 148 | |
---|
| 149 | Returns the required moment of the \hyperlink{classepdf}{epdf}. |
---|
| 150 | |
---|
| 151 | Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \begin{Desc} |
---|
| 152 | \item[Parameters:] |
---|
| 153 | \begin{description} |
---|
| 154 | \item[{\em cond}]is numeric value of {\tt rv} \item[{\em ll}]is a return value of log-likelihood of the sample. \end{description} |
---|
| 155 | \end{Desc} |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | Reimplemented from \hyperlink{classmpdf_3f172b79ec4a5ebc87898a5381141f1b}{mpdf}. |
---|
| 159 | |
---|
[180] | 160 | References RV::count(), compositepdf::mpdfs, compositepdf::n, mpdf::rv, rvcinds, compositepdf::rvcsinrv, and compositepdf::rvsinrv. |
---|
[172] | 161 | |
---|
| 162 | Referenced by samplecond().\hypertarget{classmprod_e171c40e210539c2af01d6237785620b}{ |
---|
| 163 | \index{mprod@{mprod}!samplecond@{samplecond}} |
---|
| 164 | \index{samplecond@{samplecond}!mprod@{mprod}} |
---|
| 165 | \subsubsection[samplecond]{\setlength{\rightskip}{0pt plus 5cm}mat mprod::samplecond (const vec \& {\em cond}, \/ vec \& {\em ll}, \/ int {\em N})\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
---|
| 166 | \label{classmprod_e171c40e210539c2af01d6237785620b} |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | Returns. |
---|
| 170 | |
---|
| 171 | \begin{Desc} |
---|
| 172 | \item[Parameters:] |
---|
| 173 | \begin{description} |
---|
| 174 | \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} |
---|
| 175 | \end{Desc} |
---|
| 176 | |
---|
| 177 | |
---|
| 178 | Reimplemented from \hyperlink{classmpdf_0e37163660f93df2a4d723cedb1da89c}{mpdf}. |
---|
| 179 | |
---|
| 180 | References RV::count(), mpdf::rv, and samplecond(). |
---|
| 181 | |
---|
[180] | 182 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
---|
[172] | 183 | \item |
---|
[180] | 184 | work/git/mixpp/bdm/stat/\hyperlink{emix_8h}{emix.h}\end{CompactItemize} |
---|