[172] | 1 | \hypertarget{classeEmp}{ |
---|
[30] | 2 | \section{eEmp Class Reference} |
---|
| 3 | \label{classeEmp}\index{eEmp@{eEmp}} |
---|
[172] | 4 | } |
---|
[30] | 5 | Weighted empirical density. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libEF.h$>$} |
---|
| 9 | |
---|
| 10 | Inheritance diagram for eEmp:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
| 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
[91] | 14 | \includegraphics[width=43pt]{classeEmp__inherit__graph} |
---|
[30] | 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
| 17 | Collaboration diagram for eEmp:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
[91] | 21 | \includegraphics[width=43pt]{classeEmp__coll__graph} |
---|
[30] | 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
[172] | 27 | \hypertarget{classeEmp_0c04b073ecd0dae3d498e680ae27e9e4}{ |
---|
| 28 | \hyperlink{classeEmp_0c04b073ecd0dae3d498e680ae27e9e4}{eEmp} (const \hyperlink{classRV}{RV} \&rv0, int n0)} |
---|
| 29 | \label{classeEmp_0c04b073ecd0dae3d498e680ae27e9e4} |
---|
[30] | 30 | |
---|
[33] | 31 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
[180] | 32 | \hypertarget{classeEmp_eab03bd3381aaea11ce34d5a26556353}{ |
---|
| 33 | void \hyperlink{classeEmp_eab03bd3381aaea11ce34d5a26556353}{set\_\-parameters} (const vec \&w0, const \hyperlink{classepdf}{epdf} $\ast$pdf0)} |
---|
| 34 | \label{classeEmp_eab03bd3381aaea11ce34d5a26556353} |
---|
[30] | 35 | |
---|
[180] | 36 | \begin{CompactList}\small\item\em Set samples and weights. \item\end{CompactList}\item |
---|
| 37 | \hypertarget{classeEmp_e31bc9e6196173c3480b06a761a3e716}{ |
---|
| 38 | void \hyperlink{classeEmp_e31bc9e6196173c3480b06a761a3e716}{set\_\-samples} (const \hyperlink{classepdf}{epdf} $\ast$pdf0)} |
---|
| 39 | \label{classeEmp_e31bc9e6196173c3480b06a761a3e716} |
---|
| 40 | |
---|
[33] | 41 | \begin{CompactList}\small\item\em Set sample. \item\end{CompactList}\item |
---|
[172] | 42 | \hypertarget{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b}{ |
---|
| 43 | vec \& \hyperlink{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b}{\_\-w} ()} |
---|
| 44 | \label{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b} |
---|
[30] | 45 | |
---|
| 46 | \begin{CompactList}\small\item\em Potentially dangerous, use with care. \item\end{CompactList}\item |
---|
[172] | 47 | \hypertarget{classeEmp_31b747eca73b16f30370827ba4cc3575}{ |
---|
| 48 | Array$<$ vec $>$ \& \hyperlink{classeEmp_31b747eca73b16f30370827ba4cc3575}{\_\-samples} ()} |
---|
| 49 | \label{classeEmp_31b747eca73b16f30370827ba4cc3575} |
---|
[30] | 50 | |
---|
[33] | 51 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 52 | \hypertarget{classeEmp_77268292fc4465cb73ddbfb1f2932a59}{ |
---|
| 53 | ivec \hyperlink{classeEmp_77268292fc4465cb73ddbfb1f2932a59}{resample} (\hyperlink{libEF_8h_99497a3ff630f761cf6bff7babd23212}{RESAMPLING\_\-METHOD} method=SYSTEMATIC)} |
---|
| 54 | \label{classeEmp_77268292fc4465cb73ddbfb1f2932a59} |
---|
[30] | 55 | |
---|
| 56 | \begin{CompactList}\small\item\em Function performs resampling, i.e. removal of low-weight samples and duplication of high-weight samples such that the new samples represent the same density. \item\end{CompactList}\item |
---|
[172] | 57 | \hypertarget{classeEmp_83f9283f92b805508d896479dc1ccf12}{ |
---|
| 58 | vec \hyperlink{classeEmp_83f9283f92b805508d896479dc1ccf12}{sample} () const } |
---|
| 59 | \label{classeEmp_83f9283f92b805508d896479dc1ccf12} |
---|
[30] | 60 | |
---|
[33] | 61 | \begin{CompactList}\small\item\em inherited operation : NOT implemneted \item\end{CompactList}\item |
---|
[172] | 62 | \hypertarget{classeEmp_23e7358995400865ad2e278945922fb3}{ |
---|
| 63 | double \hyperlink{classeEmp_23e7358995400865ad2e278945922fb3}{evalpdflog} (const vec \&val) const } |
---|
| 64 | \label{classeEmp_23e7358995400865ad2e278945922fb3} |
---|
[33] | 65 | |
---|
| 66 | \begin{CompactList}\small\item\em inherited operation : NOT implemneted \item\end{CompactList}\item |
---|
[172] | 67 | \hypertarget{classeEmp_ba055c19038cc72628d98e25197e982d}{ |
---|
| 68 | vec \hyperlink{classeEmp_ba055c19038cc72628d98e25197e982d}{mean} () const } |
---|
| 69 | \label{classeEmp_ba055c19038cc72628d98e25197e982d} |
---|
[33] | 70 | |
---|
[30] | 71 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
[172] | 72 | \hypertarget{classepdf_54d7dd53a641b618771cd9bee135181f}{ |
---|
| 73 | virtual mat \hyperlink{classepdf_54d7dd53a641b618771cd9bee135181f}{sampleN} (int N) const } |
---|
| 74 | \label{classepdf_54d7dd53a641b618771cd9bee135181f} |
---|
[106] | 75 | |
---|
| 76 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
[172] | 77 | \hypertarget{classepdf_3ea597362e11a0040fe7c990269d072c}{ |
---|
| 78 | virtual double \hyperlink{classepdf_3ea597362e11a0040fe7c990269d072c}{eval} (const vec \&val) const } |
---|
| 79 | \label{classepdf_3ea597362e11a0040fe7c990269d072c} |
---|
[30] | 80 | |
---|
| 81 | \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item |
---|
[180] | 82 | \hypertarget{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}{ |
---|
| 83 | virtual vec \hyperlink{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}{evalpdflog\_\-m} (const mat \&Val) const } |
---|
| 84 | \label{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c} |
---|
[30] | 85 | |
---|
[172] | 86 | \begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item |
---|
[181] | 87 | \hypertarget{classepdf_3ba08c0e788deff22134c049b9269666}{ |
---|
| 88 | \hyperlink{classmpdf}{mpdf} $\ast$ \hyperlink{classepdf_3ba08c0e788deff22134c049b9269666}{condition} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv})} |
---|
| 89 | \label{classepdf_3ba08c0e788deff22134c049b9269666} |
---|
| 90 | |
---|
| 91 | \begin{CompactList}\small\item\em Return conditional density on the given \hyperlink{classRV}{RV}, the remaining rvs will be in conditioning. \item\end{CompactList}\item |
---|
| 92 | \hypertarget{classepdf_bc0c171b6dafacd78d26263913b1d0c0}{ |
---|
| 93 | \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classepdf_bc0c171b6dafacd78d26263913b1d0c0}{marginal} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv})} |
---|
| 94 | \label{classepdf_bc0c171b6dafacd78d26263913b1d0c0} |
---|
| 95 | |
---|
| 96 | \begin{CompactList}\small\item\em Return marginal density on the given \hyperlink{classRV}{RV}, the remainig rvs are intergrated out. \item\end{CompactList}\item |
---|
[172] | 97 | \hypertarget{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{ |
---|
| 98 | const \hyperlink{classRV}{RV} \& \hyperlink{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{\_\-rv} () const } |
---|
| 99 | \label{classepdf_ca0d32aabb4cbba347e0c37fe8607562} |
---|
| 100 | |
---|
| 101 | \begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item |
---|
| 102 | \hypertarget{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{ |
---|
| 103 | void \hyperlink{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{\_\-renewrv} (const \hyperlink{classRV}{RV} \&in\_\-rv)} |
---|
| 104 | \label{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5} |
---|
| 105 | |
---|
| 106 | \begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize} |
---|
[30] | 107 | \subsection*{Protected Attributes} |
---|
| 108 | \begin{CompactItemize} |
---|
| 109 | \item |
---|
[172] | 110 | \hypertarget{classeEmp_8c33034de0e35f03f8bb85d3d67438fd}{ |
---|
| 111 | int \hyperlink{classeEmp_8c33034de0e35f03f8bb85d3d67438fd}{n}} |
---|
| 112 | \label{classeEmp_8c33034de0e35f03f8bb85d3d67438fd} |
---|
[30] | 113 | |
---|
| 114 | \begin{CompactList}\small\item\em Number of particles. \item\end{CompactList}\item |
---|
[172] | 115 | \hypertarget{classeEmp_ae78d144404ddba843c93b171b215de8}{ |
---|
| 116 | vec \hyperlink{classeEmp_ae78d144404ddba843c93b171b215de8}{w}} |
---|
| 117 | \label{classeEmp_ae78d144404ddba843c93b171b215de8} |
---|
[30] | 118 | |
---|
[91] | 119 | \begin{CompactList}\small\item\em Sample weights $w$. \item\end{CompactList}\item |
---|
[172] | 120 | \hypertarget{classeEmp_a4d6f4bbd6a6824fc39f14676701279a}{ |
---|
| 121 | Array$<$ vec $>$ \hyperlink{classeEmp_a4d6f4bbd6a6824fc39f14676701279a}{samples}} |
---|
| 122 | \label{classeEmp_a4d6f4bbd6a6824fc39f14676701279a} |
---|
[30] | 123 | |
---|
[33] | 124 | \begin{CompactList}\small\item\em Samples $x^{(i)}, i=1..n$. \item\end{CompactList}\item |
---|
[172] | 125 | \hypertarget{classepdf_74da992e3f5d598da8850b646b79b9d9}{ |
---|
| 126 | \hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}} |
---|
| 127 | \label{classepdf_74da992e3f5d598da8850b646b79b9d9} |
---|
[30] | 128 | |
---|
[33] | 129 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
[30] | 130 | |
---|
| 131 | |
---|
| 132 | \subsection{Detailed Description} |
---|
| 133 | Weighted empirical density. |
---|
| 134 | |
---|
| 135 | Used e.g. in particle filters. |
---|
| 136 | |
---|
| 137 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 138 | \item |
---|
[172] | 139 | work/git/mixpp/bdm/stat/\hyperlink{libEF_8h}{libEF.h}\item |
---|
[145] | 140 | work/git/mixpp/bdm/stat/libEF.cpp\end{CompactItemize} |
---|