| 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 |
|---|
| 14 | \includegraphics[width=47pt]{classmprod__inherit__graph} |
|---|
| 15 | \end{center} |
|---|
| 16 | \end{figure} |
|---|
| 17 | Collaboration diagram for mprod:\nopagebreak |
|---|
| 18 | \begin{figure}[H] |
|---|
| 19 | \begin{center} |
|---|
| 20 | \leavevmode |
|---|
| 21 | \includegraphics[width=60pt]{classmprod__coll__graph} |
|---|
| 22 | \end{center} |
|---|
| 23 | \end{figure} |
|---|
| 24 | \subsection*{Public Member Functions} |
|---|
| 25 | \begin{CompactItemize} |
|---|
| 26 | \item |
|---|
| 27 | \hypertarget{classmprod_37f028561c45ce5fd3a1351a911e31dc}{ |
|---|
| 28 | \hyperlink{classmprod_37f028561c45ce5fd3a1351a911e31dc}{mprod} (Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ mFacs, bool overlap=false)} |
|---|
| 29 | \label{classmprod_37f028561c45ce5fd3a1351a911e31dc} |
|---|
| 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 |
|---|
| 41 | \hypertarget{classmpdf_0f95a0cc6ab40611f46804682446ed83}{ |
|---|
| 42 | virtual void \hyperlink{classmpdf_0f95a0cc6ab40611f46804682446ed83}{condition} (const vec \&cond)} |
|---|
| 43 | \label{classmpdf_0f95a0cc6ab40611f46804682446ed83} |
|---|
| 44 | |
|---|
| 45 | \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 |
|---|
| 46 | \hypertarget{classmpdf_80b738ece5bd4f8c4edaee4b38906f91}{ |
|---|
| 47 | virtual double \hyperlink{classmpdf_80b738ece5bd4f8c4edaee4b38906f91}{evalcond} (const vec \&dt, const vec \&cond)} |
|---|
| 48 | \label{classmpdf_80b738ece5bd4f8c4edaee4b38906f91} |
|---|
| 49 | |
|---|
| 50 | \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 |
|---|
| 51 | \hypertarget{classmpdf_ec9c850305984582548e8deb64f0ffe8}{ |
|---|
| 52 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_ec9c850305984582548e8deb64f0ffe8}{\_\-rvc} ()} |
|---|
| 53 | \label{classmpdf_ec9c850305984582548e8deb64f0ffe8} |
|---|
| 54 | |
|---|
| 55 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
|---|
| 56 | \hypertarget{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32}{ |
|---|
| 57 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32}{\_\-rv} ()} |
|---|
| 58 | \label{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32} |
|---|
| 59 | |
|---|
| 60 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
|---|
| 61 | \hypertarget{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{ |
|---|
| 62 | \hyperlink{classepdf}{epdf} \& \hyperlink{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{\_\-epdf} ()} |
|---|
| 63 | \label{classmpdf_e17780ee5b2cfe05922a6c56af1462f8} |
|---|
| 64 | |
|---|
| 65 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
|---|
| 66 | \subsection*{Protected Attributes} |
|---|
| 67 | \begin{CompactItemize} |
|---|
| 68 | \item |
|---|
| 69 | \hypertarget{classmprod_7dcf1dde4a220f8c7b97ed987bff6c1f}{ |
|---|
| 70 | int \textbf{n}} |
|---|
| 71 | \label{classmprod_7dcf1dde4a220f8c7b97ed987bff6c1f} |
|---|
| 72 | |
|---|
| 73 | \item |
|---|
| 74 | \hypertarget{classmprod_0883ce383e8475546df138719918f70e}{ |
|---|
| 75 | Array$<$ \hyperlink{classepdf}{epdf} $\ast$ $>$ \textbf{epdfs}} |
|---|
| 76 | \label{classmprod_0883ce383e8475546df138719918f70e} |
|---|
| 77 | |
|---|
| 78 | \item |
|---|
| 79 | \hypertarget{classmprod_2389c7585ac5d0d79587625186818889}{ |
|---|
| 80 | Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ \textbf{mpdfs}} |
|---|
| 81 | \label{classmprod_2389c7585ac5d0d79587625186818889} |
|---|
| 82 | |
|---|
| 83 | \item |
|---|
| 84 | \hypertarget{classmprod_c8f78fbcdb4e38ecd3197d2958082497}{ |
|---|
| 85 | Array$<$ ivec $>$ \hyperlink{classmprod_c8f78fbcdb4e38ecd3197d2958082497}{rvinds}} |
|---|
| 86 | \label{classmprod_c8f78fbcdb4e38ecd3197d2958082497} |
|---|
| 87 | |
|---|
| 88 | \begin{CompactList}\small\item\em Indeces of rvs in common rv. \item\end{CompactList}\item |
|---|
| 89 | \hypertarget{classmprod_1725c7b497a27ab3c4889b846666b516}{ |
|---|
| 90 | Array$<$ ivec $>$ \hyperlink{classmprod_1725c7b497a27ab3c4889b846666b516}{rvcinrv}} |
|---|
| 91 | \label{classmprod_1725c7b497a27ab3c4889b846666b516} |
|---|
| 92 | |
|---|
| 93 | \begin{CompactList}\small\item\em Indeces of rvc in common rv. \item\end{CompactList}\item |
|---|
| 94 | \hypertarget{classmprod_cc85192d8abc01832937ed8b62e363a6}{ |
|---|
| 95 | Array$<$ ivec $>$ \hyperlink{classmprod_cc85192d8abc01832937ed8b62e363a6}{rvcinds}} |
|---|
| 96 | \label{classmprod_cc85192d8abc01832937ed8b62e363a6} |
|---|
| 97 | |
|---|
| 98 | \begin{CompactList}\small\item\em Indeces of rvc in common rvc. \item\end{CompactList}\item |
|---|
| 99 | \hypertarget{classmpdf_f6687c07ff07d47812dd565368ca59eb}{ |
|---|
| 100 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv}} |
|---|
| 101 | \label{classmpdf_f6687c07ff07d47812dd565368ca59eb} |
|---|
| 102 | |
|---|
| 103 | \begin{CompactList}\small\item\em modeled random variable \item\end{CompactList}\item |
|---|
| 104 | \hypertarget{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{ |
|---|
| 105 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc}} |
|---|
| 106 | \label{classmpdf_acb7dda792b3cd5576f39fa3129abbab} |
|---|
| 107 | |
|---|
| 108 | \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item |
|---|
| 109 | \hypertarget{classmpdf_7aa894208a32f3487827df6d5054424c}{ |
|---|
| 110 | \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classmpdf_7aa894208a32f3487827df6d5054424c}{ep}} |
|---|
| 111 | \label{classmpdf_7aa894208a32f3487827df6d5054424c} |
|---|
| 112 | |
|---|
| 113 | \begin{CompactList}\small\item\em pointer to internal \hyperlink{classepdf}{epdf} \item\end{CompactList}\end{CompactItemize} |
|---|
| 114 | |
|---|
| 115 | |
|---|
| 116 | \subsection{Detailed Description} |
|---|
| 117 | Chain rule decomposition of \hyperlink{classepdf}{epdf}. |
|---|
| 118 | |
|---|
| 119 | 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 |
|---|
| 120 | |
|---|
| 121 | \subsection{Member Function Documentation} |
|---|
| 122 | \hypertarget{classmprod_a48887eb8738a9e5550bfc38eb8e9d68}{ |
|---|
| 123 | \index{mprod@{mprod}!samplecond@{samplecond}} |
|---|
| 124 | \index{samplecond@{samplecond}!mprod@{mprod}} |
|---|
| 125 | \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{]}}}} |
|---|
| 126 | \label{classmprod_a48887eb8738a9e5550bfc38eb8e9d68} |
|---|
| 127 | |
|---|
| 128 | |
|---|
| 129 | Returns the required moment of the \hyperlink{classepdf}{epdf}. |
|---|
| 130 | |
|---|
| 131 | Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \begin{Desc} |
|---|
| 132 | \item[Parameters:] |
|---|
| 133 | \begin{description} |
|---|
| 134 | \item[{\em cond}]is numeric value of {\tt rv} \item[{\em ll}]is a return value of log-likelihood of the sample. \end{description} |
|---|
| 135 | \end{Desc} |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | Reimplemented from \hyperlink{classmpdf_3f172b79ec4a5ebc87898a5381141f1b}{mpdf}. |
|---|
| 139 | |
|---|
| 140 | References RV::count(), mpdf::rv, rvcinds, rvcinrv, and rvinds. |
|---|
| 141 | |
|---|
| 142 | Referenced by samplecond().\hypertarget{classmprod_e171c40e210539c2af01d6237785620b}{ |
|---|
| 143 | \index{mprod@{mprod}!samplecond@{samplecond}} |
|---|
| 144 | \index{samplecond@{samplecond}!mprod@{mprod}} |
|---|
| 145 | \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{]}}}} |
|---|
| 146 | \label{classmprod_e171c40e210539c2af01d6237785620b} |
|---|
| 147 | |
|---|
| 148 | |
|---|
| 149 | Returns. |
|---|
| 150 | |
|---|
| 151 | \begin{Desc} |
|---|
| 152 | \item[Parameters:] |
|---|
| 153 | \begin{description} |
|---|
| 154 | \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} |
|---|
| 155 | \end{Desc} |
|---|
| 156 | |
|---|
| 157 | |
|---|
| 158 | Reimplemented from \hyperlink{classmpdf_0e37163660f93df2a4d723cedb1da89c}{mpdf}. |
|---|
| 159 | |
|---|
| 160 | References RV::count(), mpdf::rv, and samplecond(). |
|---|
| 161 | |
|---|
| 162 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
|---|
| 163 | \item |
|---|
| 164 | work/git/mixpp/bdm/stat/\hyperlink{emix_8h}{emix.h}\item |
|---|
| 165 | work/git/mixpp/bdm/stat/emix.cpp\end{CompactItemize} |
|---|