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_6606a656c1b28114f7384c25aaf80e8d}{ |
---|
33 | void \hyperlink{classeEmp_6606a656c1b28114f7384c25aaf80e8d}{set\_\-parameters} (const vec \&w0, \hyperlink{classepdf}{epdf} $\ast$pdf0)} |
---|
34 | \label{classeEmp_6606a656c1b28114f7384c25aaf80e8d} |
---|
35 | |
---|
36 | \begin{CompactList}\small\item\em Set sample. \item\end{CompactList}\item |
---|
37 | \hypertarget{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b}{ |
---|
38 | vec \& \hyperlink{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b}{\_\-w} ()} |
---|
39 | \label{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b} |
---|
40 | |
---|
41 | \begin{CompactList}\small\item\em Potentially dangerous, use with care. \item\end{CompactList}\item |
---|
42 | \hypertarget{classeEmp_31b747eca73b16f30370827ba4cc3575}{ |
---|
43 | Array$<$ vec $>$ \& \hyperlink{classeEmp_31b747eca73b16f30370827ba4cc3575}{\_\-samples} ()} |
---|
44 | \label{classeEmp_31b747eca73b16f30370827ba4cc3575} |
---|
45 | |
---|
46 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
47 | \hypertarget{classeEmp_77268292fc4465cb73ddbfb1f2932a59}{ |
---|
48 | ivec \hyperlink{classeEmp_77268292fc4465cb73ddbfb1f2932a59}{resample} (\hyperlink{libEF_8h_99497a3ff630f761cf6bff7babd23212}{RESAMPLING\_\-METHOD} method=SYSTEMATIC)} |
---|
49 | \label{classeEmp_77268292fc4465cb73ddbfb1f2932a59} |
---|
50 | |
---|
51 | \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 |
---|
52 | \hypertarget{classeEmp_83f9283f92b805508d896479dc1ccf12}{ |
---|
53 | vec \hyperlink{classeEmp_83f9283f92b805508d896479dc1ccf12}{sample} () const } |
---|
54 | \label{classeEmp_83f9283f92b805508d896479dc1ccf12} |
---|
55 | |
---|
56 | \begin{CompactList}\small\item\em inherited operation : NOT implemneted \item\end{CompactList}\item |
---|
57 | \hypertarget{classeEmp_23e7358995400865ad2e278945922fb3}{ |
---|
58 | double \hyperlink{classeEmp_23e7358995400865ad2e278945922fb3}{evalpdflog} (const vec \&val) const } |
---|
59 | \label{classeEmp_23e7358995400865ad2e278945922fb3} |
---|
60 | |
---|
61 | \begin{CompactList}\small\item\em inherited operation : NOT implemneted \item\end{CompactList}\item |
---|
62 | \hypertarget{classeEmp_ba055c19038cc72628d98e25197e982d}{ |
---|
63 | vec \hyperlink{classeEmp_ba055c19038cc72628d98e25197e982d}{mean} () const } |
---|
64 | \label{classeEmp_ba055c19038cc72628d98e25197e982d} |
---|
65 | |
---|
66 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
67 | \hypertarget{classepdf_54d7dd53a641b618771cd9bee135181f}{ |
---|
68 | virtual mat \hyperlink{classepdf_54d7dd53a641b618771cd9bee135181f}{sampleN} (int N) const } |
---|
69 | \label{classepdf_54d7dd53a641b618771cd9bee135181f} |
---|
70 | |
---|
71 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
72 | \hypertarget{classepdf_3ea597362e11a0040fe7c990269d072c}{ |
---|
73 | virtual double \hyperlink{classepdf_3ea597362e11a0040fe7c990269d072c}{eval} (const vec \&val) const } |
---|
74 | \label{classepdf_3ea597362e11a0040fe7c990269d072c} |
---|
75 | |
---|
76 | \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item |
---|
77 | \hypertarget{classepdf_6af383b6f1c6ea6fc5f6724dd03d8877}{ |
---|
78 | virtual vec \hyperlink{classepdf_6af383b6f1c6ea6fc5f6724dd03d8877}{evalpdflog} (const mat \&Val) const } |
---|
79 | \label{classepdf_6af383b6f1c6ea6fc5f6724dd03d8877} |
---|
80 | |
---|
81 | \begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item |
---|
82 | \hypertarget{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{ |
---|
83 | const \hyperlink{classRV}{RV} \& \hyperlink{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{\_\-rv} () const } |
---|
84 | \label{classepdf_ca0d32aabb4cbba347e0c37fe8607562} |
---|
85 | |
---|
86 | \begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item |
---|
87 | \hypertarget{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{ |
---|
88 | void \hyperlink{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{\_\-renewrv} (const \hyperlink{classRV}{RV} \&in\_\-rv)} |
---|
89 | \label{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5} |
---|
90 | |
---|
91 | \begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize} |
---|
92 | \subsection*{Protected Attributes} |
---|
93 | \begin{CompactItemize} |
---|
94 | \item |
---|
95 | \hypertarget{classeEmp_8c33034de0e35f03f8bb85d3d67438fd}{ |
---|
96 | int \hyperlink{classeEmp_8c33034de0e35f03f8bb85d3d67438fd}{n}} |
---|
97 | \label{classeEmp_8c33034de0e35f03f8bb85d3d67438fd} |
---|
98 | |
---|
99 | \begin{CompactList}\small\item\em Number of particles. \item\end{CompactList}\item |
---|
100 | \hypertarget{classeEmp_ae78d144404ddba843c93b171b215de8}{ |
---|
101 | vec \hyperlink{classeEmp_ae78d144404ddba843c93b171b215de8}{w}} |
---|
102 | \label{classeEmp_ae78d144404ddba843c93b171b215de8} |
---|
103 | |
---|
104 | \begin{CompactList}\small\item\em Sample weights $w$. \item\end{CompactList}\item |
---|
105 | \hypertarget{classeEmp_a4d6f4bbd6a6824fc39f14676701279a}{ |
---|
106 | Array$<$ vec $>$ \hyperlink{classeEmp_a4d6f4bbd6a6824fc39f14676701279a}{samples}} |
---|
107 | \label{classeEmp_a4d6f4bbd6a6824fc39f14676701279a} |
---|
108 | |
---|
109 | \begin{CompactList}\small\item\em Samples $x^{(i)}, i=1..n$. \item\end{CompactList}\item |
---|
110 | \hypertarget{classepdf_74da992e3f5d598da8850b646b79b9d9}{ |
---|
111 | \hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}} |
---|
112 | \label{classepdf_74da992e3f5d598da8850b646b79b9d9} |
---|
113 | |
---|
114 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
115 | |
---|
116 | |
---|
117 | \subsection{Detailed Description} |
---|
118 | Weighted empirical density. |
---|
119 | |
---|
120 | Used e.g. in particle filters. |
---|
121 | |
---|
122 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
123 | \item |
---|
124 | work/git/mixpp/bdm/stat/\hyperlink{libEF_8h}{libEF.h}\item |
---|
125 | work/git/mixpp/bdm/stat/libEF.cpp\end{CompactItemize} |
---|