1 | \section{emix Class Reference} |
---|
2 | \label{classemix}\index{emix@{emix}} |
---|
3 | Mixture of epdfs. |
---|
4 | |
---|
5 | |
---|
6 | {\tt \#include $<$emix.h$>$} |
---|
7 | |
---|
8 | Inheritance diagram for emix:\nopagebreak |
---|
9 | \begin{figure}[H] |
---|
10 | \begin{center} |
---|
11 | \leavevmode |
---|
12 | \includegraphics[width=40pt]{classemix__inherit__graph} |
---|
13 | \end{center} |
---|
14 | \end{figure} |
---|
15 | Collaboration diagram for emix:\nopagebreak |
---|
16 | \begin{figure}[H] |
---|
17 | \begin{center} |
---|
18 | \leavevmode |
---|
19 | \includegraphics[width=40pt]{classemix__coll__graph} |
---|
20 | \end{center} |
---|
21 | \end{figure} |
---|
22 | \subsection*{Public Member Functions} |
---|
23 | \begin{CompactItemize} |
---|
24 | \item |
---|
25 | {\bf emix} ({\bf RV} \&{\bf rv})\label{classemix_3a10c8481115a5460877272ddb6532a6} |
---|
26 | |
---|
27 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
28 | void {\bf set\_\-parameters} (const vec \&{\bf w}, const Array$<$ {\bf epdf} $\ast$ $>$ \&{\bf Coms})\label{classemix_6ce82b24d7fe540ddbf44b472a005555} |
---|
29 | |
---|
30 | \begin{CompactList}\small\item\em Set weights {\tt w} and components {\tt R}. \item\end{CompactList}\item |
---|
31 | vec {\bf sample} () const |
---|
32 | \begin{CompactList}\small\item\em Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. \item\end{CompactList}\item |
---|
33 | vec {\bf mean} () const \label{classemix_b662a51d042b062020460e64bff4e9e8} |
---|
34 | |
---|
35 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
36 | double {\bf evalpdflog} (const vec \&val) const \label{classemix_469e910479b3402589104ef3bb1b5741} |
---|
37 | |
---|
38 | \begin{CompactList}\small\item\em Compute log-probability of argument {\tt val}. \item\end{CompactList}\item |
---|
39 | vec \& {\bf \_\-w} ()\label{classemix_35baf0f62307455cebfbf462144b4dd8} |
---|
40 | |
---|
41 | \begin{CompactList}\small\item\em returns a pointer to the internal mean value. Use with Care! \item\end{CompactList}\item |
---|
42 | virtual mat {\bf sampleN} (int N) const \label{classepdf_54d7dd53a641b618771cd9bee135181f} |
---|
43 | |
---|
44 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
45 | virtual double {\bf eval} (const vec \&val) const \label{classepdf_3ea597362e11a0040fe7c990269d072c} |
---|
46 | |
---|
47 | \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item |
---|
48 | {\bf RV} {\bf \_\-rv} () const \label{classepdf_b89143f12c9b49282e30841e4fb5f337} |
---|
49 | |
---|
50 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
51 | \subsection*{Protected Attributes} |
---|
52 | \begin{CompactItemize} |
---|
53 | \item |
---|
54 | vec {\bf w}\label{classemix_cdc8f4e2a5e43595ac5450d8a7f9d1ab} |
---|
55 | |
---|
56 | \begin{CompactList}\small\item\em weights of the components \item\end{CompactList}\item |
---|
57 | Array$<$ {\bf epdf} $\ast$ $>$ {\bf Coms}\label{classemix_7155d827417b53fb6aa5cff1459e6eb4} |
---|
58 | |
---|
59 | \begin{CompactList}\small\item\em Component (epdfs). \item\end{CompactList}\item |
---|
60 | {\bf RV} {\bf rv}\label{classepdf_74da992e3f5d598da8850b646b79b9d9} |
---|
61 | |
---|
62 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
63 | |
---|
64 | |
---|
65 | \subsection{Detailed Description} |
---|
66 | Mixture of epdfs. |
---|
67 | |
---|
68 | Density function: \[ f(x) = \sum_{i=1}^{n} w_{i} f_i(x), \quad \sum_{i=1}^n w_i = 1. \] where $f_i(x)$ is any density on random variable $x$, called {\em component\/}, |
---|
69 | |
---|
70 | \subsection{Member Function Documentation} |
---|
71 | \index{emix@{emix}!sample@{sample}} |
---|
72 | \index{sample@{sample}!emix@{emix}} |
---|
73 | \subsubsection[sample]{\setlength{\rightskip}{0pt plus 5cm}vec emix::sample () const\hspace{0.3cm}{\tt [virtual]}}\label{classemix_0650601f24e633e0ab09aa1e46c14483} |
---|
74 | |
---|
75 | |
---|
76 | Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. |
---|
77 | |
---|
78 | Returns a sample, $x$ from density $epdf(rv)$ |
---|
79 | |
---|
80 | Implements {\bf epdf} \doxyref{}{p.}{classepdf_8019654e494bf5e458f6fb947e11b262}. |
---|
81 | |
---|
82 | References Coms, and w. |
---|
83 | |
---|
84 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
85 | \item |
---|
86 | work/mixpp/bdm/stat/{\bf emix.h}\item |
---|
87 | work/mixpp/bdm/stat/emix.cpp\end{CompactItemize} |
---|