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=91pt]{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=102pt]{classmprod__coll__graph} |
---|
22 | \end{center} |
---|
23 | \end{figure} |
---|
24 | \subsection*{Public Member Functions} |
---|
25 | \begin{CompactItemize} |
---|
26 | \item |
---|
27 | \hypertarget{classmprod_419b303581a91ad85200bdcb4b3186f4}{ |
---|
28 | \hyperlink{classmprod_419b303581a91ad85200bdcb4b3186f4}{mprod} (Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ mFacs)} |
---|
29 | \label{classmprod_419b303581a91ad85200bdcb4b3186f4} |
---|
30 | |
---|
31 | \begin{CompactList}\small\item\em Constructor from list of mFacs,. \item\end{CompactList}\item |
---|
32 | \hypertarget{classmprod_f5e1075f133f203113d92084b4a47c28}{ |
---|
33 | double \hyperlink{classmprod_f5e1075f133f203113d92084b4a47c28}{evallogcond} (const vec \&val, const vec \&cond)} |
---|
34 | \label{classmprod_f5e1075f133f203113d92084b4a47c28} |
---|
35 | |
---|
36 | \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 |
---|
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 | \hypertarget{classmprod_e171c40e210539c2af01d6237785620b}{ |
---|
40 | mat \textbf{samplecond} (const vec \&cond, vec \&ll, int N)} |
---|
41 | \label{classmprod_e171c40e210539c2af01d6237785620b} |
---|
42 | |
---|
43 | \item |
---|
44 | \hyperlink{classRV}{RV} \hyperlink{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93}{getrv} (bool checkoverlap=false) |
---|
45 | \begin{CompactList}\small\item\em find common rv, flag \item\end{CompactList}\item |
---|
46 | \hypertarget{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac}{ |
---|
47 | void \hyperlink{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac}{setrvc} (const \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv}, \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc})} |
---|
48 | \label{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac} |
---|
49 | |
---|
50 | \begin{CompactList}\small\item\em common rvc of all mpdfs is written to rvc \item\end{CompactList}\item |
---|
51 | virtual mat \hyperlink{classmpdf_b1dae6171ee39a6a05976c7b1007a3c5}{samplecond\_\-m} (const vec \&cond, vec \&ll, int N) |
---|
52 | \begin{CompactList}\small\item\em Returns. \item\end{CompactList}\item |
---|
53 | \hypertarget{classmpdf_0f95a0cc6ab40611f46804682446ed83}{ |
---|
54 | virtual void \hyperlink{classmpdf_0f95a0cc6ab40611f46804682446ed83}{condition} (const vec \&cond)} |
---|
55 | \label{classmpdf_0f95a0cc6ab40611f46804682446ed83} |
---|
56 | |
---|
57 | \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 |
---|
58 | \hypertarget{classmpdf_95fcff214848f66f1b489459370573fa}{ |
---|
59 | virtual vec \hyperlink{classmpdf_95fcff214848f66f1b489459370573fa}{evallogcond\_\-m} (const mat \&Dt, const vec \&cond)} |
---|
60 | \label{classmpdf_95fcff214848f66f1b489459370573fa} |
---|
61 | |
---|
62 | \begin{CompactList}\small\item\em Matrix version of evallogcond. \item\end{CompactList}\item |
---|
63 | \hypertarget{classmpdf_15ef062183b1ccdf794732d5fa0b77cd}{ |
---|
64 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_15ef062183b1ccdf794732d5fa0b77cd}{\_\-rvc} () const } |
---|
65 | \label{classmpdf_15ef062183b1ccdf794732d5fa0b77cd} |
---|
66 | |
---|
67 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
68 | \hypertarget{classmpdf_71256ffb5fbd08f41d650e606a5bd585}{ |
---|
69 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_71256ffb5fbd08f41d650e606a5bd585}{\_\-rv} () const } |
---|
70 | \label{classmpdf_71256ffb5fbd08f41d650e606a5bd585} |
---|
71 | |
---|
72 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
73 | \hypertarget{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{ |
---|
74 | \hyperlink{classepdf}{epdf} \& \hyperlink{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{\_\-epdf} ()} |
---|
75 | \label{classmpdf_e17780ee5b2cfe05922a6c56af1462f8} |
---|
76 | |
---|
77 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
78 | \subsection*{Protected Attributes} |
---|
79 | \begin{CompactItemize} |
---|
80 | \item |
---|
81 | \hypertarget{classmprod_0883ce383e8475546df138719918f70e}{ |
---|
82 | Array$<$ \hyperlink{classepdf}{epdf} $\ast$ $>$ \hyperlink{classmprod_0883ce383e8475546df138719918f70e}{epdfs}} |
---|
83 | \label{classmprod_0883ce383e8475546df138719918f70e} |
---|
84 | |
---|
85 | \begin{CompactList}\small\item\em pointers to epdfs - shortcut to \hyperlink{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{mpdfs()}.\hyperlink{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{\_\-epdf()} \item\end{CompactList}\item |
---|
86 | \hypertarget{classmprod_5334777dda3dad9b9fa73e22e8d0f24c}{ |
---|
87 | Array$<$ \hyperlink{classdatalink__m2m}{datalink\_\-m2m} $\ast$ $>$ \hyperlink{classmprod_5334777dda3dad9b9fa73e22e8d0f24c}{dls}} |
---|
88 | \label{classmprod_5334777dda3dad9b9fa73e22e8d0f24c} |
---|
89 | |
---|
90 | \begin{CompactList}\small\item\em Data link for each mpdfs. \item\end{CompactList}\item |
---|
91 | \hypertarget{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}{ |
---|
92 | int \hyperlink{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}{n}} |
---|
93 | \label{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f} |
---|
94 | |
---|
95 | \begin{CompactList}\small\item\em Number of mpdfs in the composite. \item\end{CompactList}\item |
---|
96 | \hypertarget{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{ |
---|
97 | Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ \hyperlink{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{mpdfs}} |
---|
98 | \label{classcompositepdf_637877061b917a16a0421bb5c4cd480d} |
---|
99 | |
---|
100 | \begin{CompactList}\small\item\em Elements of composition. \item\end{CompactList}\item |
---|
101 | \hypertarget{classmpdf_f6687c07ff07d47812dd565368ca59eb}{ |
---|
102 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv}} |
---|
103 | \label{classmpdf_f6687c07ff07d47812dd565368ca59eb} |
---|
104 | |
---|
105 | \begin{CompactList}\small\item\em modeled random variable \item\end{CompactList}\item |
---|
106 | \hypertarget{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{ |
---|
107 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc}} |
---|
108 | \label{classmpdf_acb7dda792b3cd5576f39fa3129abbab} |
---|
109 | |
---|
110 | \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item |
---|
111 | \hypertarget{classmpdf_7aa894208a32f3487827df6d5054424c}{ |
---|
112 | \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classmpdf_7aa894208a32f3487827df6d5054424c}{ep}} |
---|
113 | \label{classmpdf_7aa894208a32f3487827df6d5054424c} |
---|
114 | |
---|
115 | \begin{CompactList}\small\item\em pointer to internal \hyperlink{classepdf}{epdf} \item\end{CompactList}\end{CompactItemize} |
---|
116 | |
---|
117 | |
---|
118 | \subsection{Detailed Description} |
---|
119 | Chain rule decomposition of \hyperlink{classepdf}{epdf}. |
---|
120 | |
---|
121 | 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 |
---|
122 | |
---|
123 | \subsection{Member Function Documentation} |
---|
124 | \hypertarget{classmprod_a48887eb8738a9e5550bfc38eb8e9d68}{ |
---|
125 | \index{mprod@{mprod}!samplecond@{samplecond}} |
---|
126 | \index{samplecond@{samplecond}!mprod@{mprod}} |
---|
127 | \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{]}}}} |
---|
128 | \label{classmprod_a48887eb8738a9e5550bfc38eb8e9d68} |
---|
129 | |
---|
130 | |
---|
131 | Returns the required moment of the \hyperlink{classepdf}{epdf}. |
---|
132 | |
---|
133 | Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \begin{Desc} |
---|
134 | \item[Parameters:] |
---|
135 | \begin{description} |
---|
136 | \item[{\em cond}]is numeric value of {\tt rv} \item[{\em ll}]is a return value of log-likelihood of the sample. \end{description} |
---|
137 | \end{Desc} |
---|
138 | |
---|
139 | |
---|
140 | Reimplemented from \hyperlink{classmpdf_3f172b79ec4a5ebc87898a5381141f1b}{mpdf}. |
---|
141 | |
---|
142 | References RV::count(), dls, epdfs, compositepdf::mpdfs, compositepdf::n, and mpdf::rv.\hypertarget{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93}{ |
---|
143 | \index{mprod@{mprod}!getrv@{getrv}} |
---|
144 | \index{getrv@{getrv}!mprod@{mprod}} |
---|
145 | \subsubsection[getrv]{\setlength{\rightskip}{0pt plus 5cm}{\bf RV} compositepdf::getrv (bool {\em checkoverlap} = {\tt false})\hspace{0.3cm}{\tt \mbox{[}inherited\mbox{]}}}} |
---|
146 | \label{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93} |
---|
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 RV::add(), compositepdf::mpdfs, and compositepdf::n.\hypertarget{classmpdf_b1dae6171ee39a6a05976c7b1007a3c5}{ |
---|
159 | \index{mprod@{mprod}!samplecond\_\-m@{samplecond\_\-m}} |
---|
160 | \index{samplecond\_\-m@{samplecond\_\-m}!mprod@{mprod}} |
---|
161 | \subsubsection[samplecond\_\-m]{\setlength{\rightskip}{0pt plus 5cm}virtual mat mpdf::samplecond\_\-m (const vec \& {\em cond}, \/ vec \& {\em ll}, \/ int {\em N})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
162 | \label{classmpdf_b1dae6171ee39a6a05976c7b1007a3c5} |
---|
163 | |
---|
164 | |
---|
165 | Returns. |
---|
166 | |
---|
167 | \begin{Desc} |
---|
168 | \item[Parameters:] |
---|
169 | \begin{description} |
---|
170 | \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} |
---|
171 | \end{Desc} |
---|
172 | |
---|
173 | |
---|
174 | References mpdf::condition(), RV::count(), mpdf::ep, epdf::evallog(), mpdf::rv, and epdf::sample(). |
---|
175 | |
---|
176 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
---|
177 | \item |
---|
178 | work/git/mixpp/bdm/stat/\hyperlink{emix_8h}{emix.h}\end{CompactItemize} |
---|