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