1 | \hypertarget{classbdm_1_1egiw}{ |
---|
2 | \section{bdm::egiw Class Reference} |
---|
3 | \label{classbdm_1_1egiw}\index{bdm::egiw@{bdm::egiw}} |
---|
4 | } |
---|
5 | Gauss-inverse-Wishart density stored in LD form. |
---|
6 | |
---|
7 | |
---|
8 | {\tt \#include $<$libEF.h$>$} |
---|
9 | |
---|
10 | Inheritance diagram for bdm::egiw:\nopagebreak |
---|
11 | \begin{figure}[H] |
---|
12 | \begin{center} |
---|
13 | \leavevmode |
---|
14 | \includegraphics[width=64pt]{classbdm_1_1egiw__inherit__graph} |
---|
15 | \end{center} |
---|
16 | \end{figure} |
---|
17 | Collaboration diagram for bdm::egiw:\nopagebreak |
---|
18 | \begin{figure}[H] |
---|
19 | \begin{center} |
---|
20 | \leavevmode |
---|
21 | \includegraphics[width=89pt]{classbdm_1_1egiw__coll__graph} |
---|
22 | \end{center} |
---|
23 | \end{figure} |
---|
24 | \subsection*{Public Member Functions} |
---|
25 | \begin{CompactItemize} |
---|
26 | \item |
---|
27 | \hypertarget{classbdm_1_1egiw_a60e072c191acf65ab480deeb11c5b88}{ |
---|
28 | \hyperlink{classbdm_1_1egiw_a60e072c191acf65ab480deeb11c5b88}{egiw} (\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}, mat V0, double nu0=-1.0)} |
---|
29 | \label{classbdm_1_1egiw_a60e072c191acf65ab480deeb11c5b88} |
---|
30 | |
---|
31 | \begin{CompactList}\small\item\em Default constructor, if nu0$<$0 a minimal nu0 will be computed. \item\end{CompactList}\item |
---|
32 | \hypertarget{classbdm_1_1egiw_bc3db93cb60dd29187eb3c6cfd557f97}{ |
---|
33 | \hyperlink{classbdm_1_1egiw_bc3db93cb60dd29187eb3c6cfd557f97}{egiw} (\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}, \hyperlink{classldmat}{ldmat} V0, double nu0=-1.0)} |
---|
34 | \label{classbdm_1_1egiw_bc3db93cb60dd29187eb3c6cfd557f97} |
---|
35 | |
---|
36 | \begin{CompactList}\small\item\em Full constructor for V in \hyperlink{classldmat}{ldmat} form. \item\end{CompactList}\item |
---|
37 | \hypertarget{classbdm_1_1egiw_920f21548b7a3723923dd108fe514c61}{ |
---|
38 | vec \hyperlink{classbdm_1_1egiw_920f21548b7a3723923dd108fe514c61}{sample} () const } |
---|
39 | \label{classbdm_1_1egiw_920f21548b7a3723923dd108fe514c61} |
---|
40 | |
---|
41 | \begin{CompactList}\small\item\em Returns a sample, $x$ from density $epdf(rv)$. \item\end{CompactList}\item |
---|
42 | \hypertarget{classbdm_1_1egiw_df70c05f918c3a6f86d60f10c1fd6ba2}{ |
---|
43 | vec \hyperlink{classbdm_1_1egiw_df70c05f918c3a6f86d60f10c1fd6ba2}{mean} () const } |
---|
44 | \label{classbdm_1_1egiw_df70c05f918c3a6f86d60f10c1fd6ba2} |
---|
45 | |
---|
46 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
47 | \hypertarget{classbdm_1_1egiw_c1ecc406613cc2341225dc10c3d3b46a}{ |
---|
48 | vec \hyperlink{classbdm_1_1egiw_c1ecc406613cc2341225dc10c3d3b46a}{variance} () const } |
---|
49 | \label{classbdm_1_1egiw_c1ecc406613cc2341225dc10c3d3b46a} |
---|
50 | |
---|
51 | \begin{CompactList}\small\item\em return expected variance (not covariance!) \item\end{CompactList}\item |
---|
52 | \hypertarget{classbdm_1_1egiw_d2075aa2306648b3e4fe40bb86628d5c}{ |
---|
53 | void \textbf{mean\_\-mat} (mat \&M, mat \&R) const } |
---|
54 | \label{classbdm_1_1egiw_d2075aa2306648b3e4fe40bb86628d5c} |
---|
55 | |
---|
56 | \item |
---|
57 | \hypertarget{classbdm_1_1egiw_bfb8e7c619b34ad804a73bff71742b5e}{ |
---|
58 | double \hyperlink{classbdm_1_1egiw_bfb8e7c619b34ad804a73bff71742b5e}{evallog\_\-nn} (const vec \&val) const } |
---|
59 | \label{classbdm_1_1egiw_bfb8e7c619b34ad804a73bff71742b5e} |
---|
60 | |
---|
61 | \begin{CompactList}\small\item\em In this instance, val= \mbox{[}theta, r\mbox{]}. For multivariate instances, it is stored columnwise val = \mbox{[}theta\_\-1 theta\_\-2 ... r\_\-1 r\_\-2 \mbox{]}. \item\end{CompactList}\item |
---|
62 | \hypertarget{classbdm_1_1egiw_41d72ba7b2abc8a9a4209ffa98ed5633}{ |
---|
63 | double \hyperlink{classbdm_1_1egiw_41d72ba7b2abc8a9a4209ffa98ed5633}{lognc} () const } |
---|
64 | \label{classbdm_1_1egiw_41d72ba7b2abc8a9a4209ffa98ed5633} |
---|
65 | |
---|
66 | \begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item |
---|
67 | \hypertarget{classbdm_1_1egiw_15792f3112e5cf67d572f491b09324c8}{ |
---|
68 | \hyperlink{classldmat}{ldmat} \& \hyperlink{classbdm_1_1egiw_15792f3112e5cf67d572f491b09324c8}{\_\-V} ()} |
---|
69 | \label{classbdm_1_1egiw_15792f3112e5cf67d572f491b09324c8} |
---|
70 | |
---|
71 | \begin{CompactList}\small\item\em returns a pointer to the internal statistics. Use with Care! \item\end{CompactList}\item |
---|
72 | \hypertarget{classbdm_1_1egiw_ad9c539a80a552e837245ddcebcbbba4}{ |
---|
73 | const \hyperlink{classldmat}{ldmat} \& \hyperlink{classbdm_1_1egiw_ad9c539a80a552e837245ddcebcbbba4}{\_\-V} () const } |
---|
74 | \label{classbdm_1_1egiw_ad9c539a80a552e837245ddcebcbbba4} |
---|
75 | |
---|
76 | \begin{CompactList}\small\item\em returns a pointer to the internal statistics. Use with Care! \item\end{CompactList}\item |
---|
77 | \hypertarget{classbdm_1_1egiw_a025ee710274ca142dd0ae978735ad4a}{ |
---|
78 | double \& \hyperlink{classbdm_1_1egiw_a025ee710274ca142dd0ae978735ad4a}{\_\-nu} ()} |
---|
79 | \label{classbdm_1_1egiw_a025ee710274ca142dd0ae978735ad4a} |
---|
80 | |
---|
81 | \begin{CompactList}\small\item\em returns a pointer to the internal statistics. Use with Care! \item\end{CompactList}\item |
---|
82 | \hypertarget{classbdm_1_1egiw_cf3b2bcb158c15c24788bba90e4154e4}{ |
---|
83 | const double \& \textbf{\_\-nu} () const } |
---|
84 | \label{classbdm_1_1egiw_cf3b2bcb158c15c24788bba90e4154e4} |
---|
85 | |
---|
86 | \item |
---|
87 | \hypertarget{classbdm_1_1egiw_8e610e95401a11baf34f65e16ecd87be}{ |
---|
88 | void \hyperlink{classbdm_1_1egiw_8e610e95401a11baf34f65e16ecd87be}{pow} (double p)} |
---|
89 | \label{classbdm_1_1egiw_8e610e95401a11baf34f65e16ecd87be} |
---|
90 | |
---|
91 | \begin{CompactList}\small\item\em Power of the density, used e.g. to flatten the density. \item\end{CompactList}\item |
---|
92 | \hypertarget{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}{ |
---|
93 | virtual void \hyperlink{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}{dupdate} (mat \&v)} |
---|
94 | \label{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a} |
---|
95 | |
---|
96 | \begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item |
---|
97 | \hypertarget{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692}{ |
---|
98 | virtual double \hyperlink{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692}{evallog} (const vec \&val) const } |
---|
99 | \label{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692} |
---|
100 | |
---|
101 | \begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item |
---|
102 | \hypertarget{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}{ |
---|
103 | virtual vec \hyperlink{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}{evallog} (const mat \&Val) const } |
---|
104 | \label{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41} |
---|
105 | |
---|
106 | \begin{CompactList}\small\item\em Evaluate normalized log-probability for many samples. \item\end{CompactList}\item |
---|
107 | \hypertarget{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058}{ |
---|
108 | virtual mat \hyperlink{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058}{sample\_\-m} (int N) const } |
---|
109 | \label{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058} |
---|
110 | |
---|
111 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
112 | \hypertarget{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62}{ |
---|
113 | virtual vec \hyperlink{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62}{evallog\_\-m} (const mat \&Val) const } |
---|
114 | \label{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62} |
---|
115 | |
---|
116 | \begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item |
---|
117 | \hypertarget{classbdm_1_1epdf_e584eac5579c1b6384947ecf66166c77}{ |
---|
118 | virtual \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ \hyperlink{classbdm_1_1epdf_e584eac5579c1b6384947ecf66166c77}{condition} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}) const } |
---|
119 | \label{classbdm_1_1epdf_e584eac5579c1b6384947ecf66166c77} |
---|
120 | |
---|
121 | \begin{CompactList}\small\item\em Return conditional density on the given \hyperlink{classbdm_1_1RV}{RV}, the remaining rvs will be in conditioning. \item\end{CompactList}\item |
---|
122 | \hypertarget{classbdm_1_1epdf_3fb2ece54f720b62ad325e61214fa0a1}{ |
---|
123 | virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1epdf_3fb2ece54f720b62ad325e61214fa0a1}{marginal} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}) const } |
---|
124 | \label{classbdm_1_1epdf_3fb2ece54f720b62ad325e61214fa0a1} |
---|
125 | |
---|
126 | \begin{CompactList}\small\item\em Return marginal density on the given \hyperlink{classbdm_1_1RV}{RV}, the remainig rvs are intergrated out. \item\end{CompactList}\item |
---|
127 | \hypertarget{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21}{ |
---|
128 | const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21}{\_\-rv} () const } |
---|
129 | \label{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21} |
---|
130 | |
---|
131 | \begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item |
---|
132 | \hypertarget{classbdm_1_1epdf_62e88cbce0ce77a8692f5e15d76e805f}{ |
---|
133 | void \hyperlink{classbdm_1_1epdf_62e88cbce0ce77a8692f5e15d76e805f}{\_\-renewrv} (const \hyperlink{classbdm_1_1RV}{RV} \&in\_\-rv)} |
---|
134 | \label{classbdm_1_1epdf_62e88cbce0ce77a8692f5e15d76e805f} |
---|
135 | |
---|
136 | \begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize} |
---|
137 | \subsection*{Protected Attributes} |
---|
138 | \begin{CompactItemize} |
---|
139 | \item |
---|
140 | \hypertarget{classbdm_1_1egiw_ae56852845c6af176fd9017dbebbbd52}{ |
---|
141 | \hyperlink{classldmat}{ldmat} \hyperlink{classbdm_1_1egiw_ae56852845c6af176fd9017dbebbbd52}{V}} |
---|
142 | \label{classbdm_1_1egiw_ae56852845c6af176fd9017dbebbbd52} |
---|
143 | |
---|
144 | \begin{CompactList}\small\item\em Extended information matrix of sufficient statistics. \item\end{CompactList}\item |
---|
145 | \hypertarget{classbdm_1_1egiw_447eacf19d4f4083872686f044814dc4}{ |
---|
146 | double \hyperlink{classbdm_1_1egiw_447eacf19d4f4083872686f044814dc4}{nu}} |
---|
147 | \label{classbdm_1_1egiw_447eacf19d4f4083872686f044814dc4} |
---|
148 | |
---|
149 | \begin{CompactList}\small\item\em Number of data records (degrees of freedom) of sufficient statistics. \item\end{CompactList}\item |
---|
150 | \hypertarget{classbdm_1_1egiw_40b68a9c3b2120fba94cc4d2fcd291e1}{ |
---|
151 | int \hyperlink{classbdm_1_1egiw_40b68a9c3b2120fba94cc4d2fcd291e1}{xdim}} |
---|
152 | \label{classbdm_1_1egiw_40b68a9c3b2120fba94cc4d2fcd291e1} |
---|
153 | |
---|
154 | \begin{CompactList}\small\item\em Dimension of the output. \item\end{CompactList}\item |
---|
155 | \hypertarget{classbdm_1_1egiw_322414c32d9a21a006a5aab0311f64fd}{ |
---|
156 | int \hyperlink{classbdm_1_1egiw_322414c32d9a21a006a5aab0311f64fd}{nPsi}} |
---|
157 | \label{classbdm_1_1egiw_322414c32d9a21a006a5aab0311f64fd} |
---|
158 | |
---|
159 | \begin{CompactList}\small\item\em Dimension of the regressor. \item\end{CompactList}\item |
---|
160 | \hypertarget{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{ |
---|
161 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}} |
---|
162 | \label{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8} |
---|
163 | |
---|
164 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
165 | |
---|
166 | |
---|
167 | \subsection{Detailed Description} |
---|
168 | Gauss-inverse-Wishart density stored in LD form. |
---|
169 | |
---|
170 | For $p$-variate densities, given rv.count() should be $p\times$ V.rows(). |
---|
171 | |
---|
172 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
173 | \item |
---|
174 | \hyperlink{libEF_8h}{libEF.h}\item |
---|
175 | libEF.cpp\end{CompactItemize} |
---|