[172] | 1 | \hypertarget{classegiw}{ |
---|
[99] | 2 | \section{egiw Class Reference} |
---|
| 3 | \label{classegiw}\index{egiw@{egiw}} |
---|
[172] | 4 | } |
---|
[99] | 5 | Gauss-inverse-Wishart density stored in LD form. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libEF.h$>$} |
---|
| 9 | |
---|
| 10 | Inheritance diagram for egiw:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
| 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
| 14 | \includegraphics[width=40pt]{classegiw__inherit__graph} |
---|
| 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
| 17 | Collaboration diagram for egiw:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
[181] | 21 | \includegraphics[width=72pt]{classegiw__coll__graph} |
---|
[99] | 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
[210] | 27 | \hypertarget{classegiw_056c094f01ca1cc308d72162f47617c9}{ |
---|
| 28 | \hyperlink{classegiw_056c094f01ca1cc308d72162f47617c9}{egiw} (\hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}, mat V0, double nu0=-1.0)} |
---|
| 29 | \label{classegiw_056c094f01ca1cc308d72162f47617c9} |
---|
[99] | 30 | |
---|
[210] | 31 | \begin{CompactList}\small\item\em Default constructor, if nu0$<$0 a minimal nu0 will be computed. \item\end{CompactList}\item |
---|
| 32 | \hypertarget{classegiw_18c1bf6125652a6dcbca68dd02dddd8d}{ |
---|
| 33 | \hyperlink{classegiw_18c1bf6125652a6dcbca68dd02dddd8d}{egiw} (\hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}, \hyperlink{classldmat}{ldmat} V0, double nu0=-1.0)} |
---|
| 34 | \label{classegiw_18c1bf6125652a6dcbca68dd02dddd8d} |
---|
[99] | 35 | |
---|
[172] | 36 | \begin{CompactList}\small\item\em Full constructor for V in \hyperlink{classldmat}{ldmat} form. \item\end{CompactList}\item |
---|
| 37 | \hypertarget{classegiw_3d2c1f2ba0f9966781f1e0ae695e8a6f}{ |
---|
| 38 | vec \hyperlink{classegiw_3d2c1f2ba0f9966781f1e0ae695e8a6f}{sample} () const } |
---|
| 39 | \label{classegiw_3d2c1f2ba0f9966781f1e0ae695e8a6f} |
---|
| 40 | |
---|
| 41 | \begin{CompactList}\small\item\em Returns a sample, $x$ from density $epdf(rv)$. \item\end{CompactList}\item |
---|
| 42 | \hypertarget{classegiw_6deb0ff2859f41ef7cbdf6a842cabb29}{ |
---|
| 43 | vec \hyperlink{classegiw_6deb0ff2859f41ef7cbdf6a842cabb29}{mean} () const } |
---|
| 44 | \label{classegiw_6deb0ff2859f41ef7cbdf6a842cabb29} |
---|
| 45 | |
---|
[99] | 46 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
[172] | 47 | \hypertarget{classegiw_9594f396acc5ad186d1c5b03b0745502}{ |
---|
| 48 | void \textbf{mean\_\-mat} (mat \&M, mat \&R) const } |
---|
| 49 | \label{classegiw_9594f396acc5ad186d1c5b03b0745502} |
---|
[99] | 50 | |
---|
[172] | 51 | \item |
---|
| 52 | \hypertarget{classegiw_2ab1e525d692be8272a6f383d60b94cd}{ |
---|
| 53 | double \hyperlink{classegiw_2ab1e525d692be8272a6f383d60b94cd}{evalpdflog\_\-nn} (const vec \&val) const } |
---|
| 54 | \label{classegiw_2ab1e525d692be8272a6f383d60b94cd} |
---|
[99] | 55 | |
---|
[172] | 56 | \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 |
---|
| 57 | \hypertarget{classegiw_70eb1a0b88459b227f919b425b0d3359}{ |
---|
| 58 | double \hyperlink{classegiw_70eb1a0b88459b227f919b425b0d3359}{lognc} () const } |
---|
| 59 | \label{classegiw_70eb1a0b88459b227f919b425b0d3359} |
---|
| 60 | |
---|
[99] | 61 | \begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item |
---|
[172] | 62 | \hypertarget{classegiw_533e792e1175bfa06d5d595dc5d080d5}{ |
---|
| 63 | \hyperlink{classldmat}{ldmat} \& \hyperlink{classegiw_533e792e1175bfa06d5d595dc5d080d5}{\_\-V} ()} |
---|
| 64 | \label{classegiw_533e792e1175bfa06d5d595dc5d080d5} |
---|
[99] | 65 | |
---|
| 66 | \begin{CompactList}\small\item\em returns a pointer to the internal statistics. Use with Care! \item\end{CompactList}\item |
---|
[210] | 67 | \hypertarget{classegiw_a46c8a206edf80b357a138d7491780c1}{ |
---|
| 68 | const \hyperlink{classldmat}{ldmat} \& \hyperlink{classegiw_a46c8a206edf80b357a138d7491780c1}{\_\-V} () const } |
---|
| 69 | \label{classegiw_a46c8a206edf80b357a138d7491780c1} |
---|
| 70 | |
---|
| 71 | \begin{CompactList}\small\item\em returns a pointer to the internal statistics. Use with Care! \item\end{CompactList}\item |
---|
[172] | 72 | \hypertarget{classegiw_08029c481ff95d24f093df0573879afe}{ |
---|
| 73 | double \& \hyperlink{classegiw_08029c481ff95d24f093df0573879afe}{\_\-nu} ()} |
---|
| 74 | \label{classegiw_08029c481ff95d24f093df0573879afe} |
---|
[99] | 75 | |
---|
| 76 | \begin{CompactList}\small\item\em returns a pointer to the internal statistics. Use with Care! \item\end{CompactList}\item |
---|
[210] | 77 | \hypertarget{classegiw_5337922a83bc63e9e826e8a8613ebfe8}{ |
---|
| 78 | const double \& \textbf{\_\-nu} () const } |
---|
| 79 | \label{classegiw_5337922a83bc63e9e826e8a8613ebfe8} |
---|
| 80 | |
---|
| 81 | \item |
---|
[172] | 82 | \hypertarget{classegiw_036306322a90a9977834baac07460816}{ |
---|
| 83 | void \hyperlink{classegiw_036306322a90a9977834baac07460816}{pow} (double p)} |
---|
| 84 | \label{classegiw_036306322a90a9977834baac07460816} |
---|
[99] | 85 | |
---|
[172] | 86 | \begin{CompactList}\small\item\em Power of the density, used e.g. to flatten the density. \item\end{CompactList}\item |
---|
| 87 | \hypertarget{classeEF_a89bef8996410609004fa019b5b48964}{ |
---|
| 88 | virtual void \hyperlink{classeEF_a89bef8996410609004fa019b5b48964}{dupdate} (mat \&v)} |
---|
| 89 | \label{classeEF_a89bef8996410609004fa019b5b48964} |
---|
[99] | 90 | |
---|
| 91 | \begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item |
---|
[172] | 92 | \hypertarget{classeEF_6466e8d4aa9dd64698ed288cbb1afc03}{ |
---|
| 93 | virtual double \hyperlink{classeEF_6466e8d4aa9dd64698ed288cbb1afc03}{evalpdflog} (const vec \&val) const } |
---|
| 94 | \label{classeEF_6466e8d4aa9dd64698ed288cbb1afc03} |
---|
[106] | 95 | |
---|
[172] | 96 | \begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item |
---|
| 97 | \hypertarget{classeEF_c71faf4b2d153efda14bf1f87dca1507}{ |
---|
| 98 | virtual vec \hyperlink{classeEF_c71faf4b2d153efda14bf1f87dca1507}{evalpdflog} (const mat \&Val) const } |
---|
| 99 | \label{classeEF_c71faf4b2d153efda14bf1f87dca1507} |
---|
| 100 | |
---|
| 101 | \begin{CompactList}\small\item\em Evaluate normalized log-probability for many samples. \item\end{CompactList}\item |
---|
[210] | 102 | \hypertarget{classepdf_76608914c3b19e150292d5c56e93e508}{ |
---|
| 103 | virtual mat \hyperlink{classepdf_76608914c3b19e150292d5c56e93e508}{sample\_\-m} (int N) const } |
---|
| 104 | \label{classepdf_76608914c3b19e150292d5c56e93e508} |
---|
[172] | 105 | |
---|
[106] | 106 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
[180] | 107 | \hypertarget{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}{ |
---|
| 108 | virtual vec \hyperlink{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}{evalpdflog\_\-m} (const mat \&Val) const } |
---|
| 109 | \label{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c} |
---|
| 110 | |
---|
| 111 | \begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item |
---|
[210] | 112 | \hypertarget{classepdf_e87dc8260a5c37bc1b03eb66174741a0}{ |
---|
| 113 | virtual \hyperlink{classmpdf}{mpdf} $\ast$ \hyperlink{classepdf_e87dc8260a5c37bc1b03eb66174741a0}{condition} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}) const } |
---|
| 114 | \label{classepdf_e87dc8260a5c37bc1b03eb66174741a0} |
---|
[181] | 115 | |
---|
| 116 | \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 |
---|
[210] | 117 | \hypertarget{classepdf_38de9f59b65ee06028554f3f74b66025}{ |
---|
| 118 | virtual \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classepdf_38de9f59b65ee06028554f3f74b66025}{marginal} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}) const } |
---|
| 119 | \label{classepdf_38de9f59b65ee06028554f3f74b66025} |
---|
[181] | 120 | |
---|
| 121 | \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] | 122 | \hypertarget{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{ |
---|
| 123 | const \hyperlink{classRV}{RV} \& \hyperlink{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{\_\-rv} () const } |
---|
| 124 | \label{classepdf_ca0d32aabb4cbba347e0c37fe8607562} |
---|
[99] | 125 | |
---|
[172] | 126 | \begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item |
---|
| 127 | \hypertarget{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{ |
---|
| 128 | void \hyperlink{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{\_\-renewrv} (const \hyperlink{classRV}{RV} \&in\_\-rv)} |
---|
| 129 | \label{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5} |
---|
| 130 | |
---|
| 131 | \begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize} |
---|
[99] | 132 | \subsection*{Protected Attributes} |
---|
| 133 | \begin{CompactItemize} |
---|
| 134 | \item |
---|
[172] | 135 | \hypertarget{classegiw_f343d03ede89db820edf44a6297fa442}{ |
---|
| 136 | \hyperlink{classldmat}{ldmat} \hyperlink{classegiw_f343d03ede89db820edf44a6297fa442}{V}} |
---|
| 137 | \label{classegiw_f343d03ede89db820edf44a6297fa442} |
---|
[99] | 138 | |
---|
| 139 | \begin{CompactList}\small\item\em Extended information matrix of sufficient statistics. \item\end{CompactList}\item |
---|
[172] | 140 | \hypertarget{classegiw_4a2f130b91afe84f6d62fed289d5d453}{ |
---|
| 141 | double \hyperlink{classegiw_4a2f130b91afe84f6d62fed289d5d453}{nu}} |
---|
| 142 | \label{classegiw_4a2f130b91afe84f6d62fed289d5d453} |
---|
[99] | 143 | |
---|
| 144 | \begin{CompactList}\small\item\em Number of data records (degrees of freedom) of sufficient statistics. \item\end{CompactList}\item |
---|
[172] | 145 | \hypertarget{classegiw_3d5c719f15a5527a6c62c2a53160148e}{ |
---|
| 146 | int \hyperlink{classegiw_3d5c719f15a5527a6c62c2a53160148e}{xdim}} |
---|
| 147 | \label{classegiw_3d5c719f15a5527a6c62c2a53160148e} |
---|
[99] | 148 | |
---|
[172] | 149 | \begin{CompactList}\small\item\em Dimension of the output. \item\end{CompactList}\item |
---|
| 150 | \hypertarget{classegiw_c70d13d86e0d9f0acede3e1dc0368812}{ |
---|
| 151 | int \hyperlink{classegiw_c70d13d86e0d9f0acede3e1dc0368812}{nPsi}} |
---|
| 152 | \label{classegiw_c70d13d86e0d9f0acede3e1dc0368812} |
---|
| 153 | |
---|
| 154 | \begin{CompactList}\small\item\em Dimension of the regressor. \item\end{CompactList}\item |
---|
| 155 | \hypertarget{classepdf_74da992e3f5d598da8850b646b79b9d9}{ |
---|
| 156 | \hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}} |
---|
| 157 | \label{classepdf_74da992e3f5d598da8850b646b79b9d9} |
---|
| 158 | |
---|
[99] | 159 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
| 160 | |
---|
| 161 | |
---|
| 162 | \subsection{Detailed Description} |
---|
| 163 | Gauss-inverse-Wishart density stored in LD form. |
---|
| 164 | |
---|
[172] | 165 | For $p$-variate densities, given rv.count() should be $p\times$ V.rows(). |
---|
[99] | 166 | |
---|
| 167 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 168 | \item |
---|
[172] | 169 | work/git/mixpp/bdm/stat/\hyperlink{libEF_8h}{libEF.h}\item |
---|
[145] | 170 | work/git/mixpp/bdm/stat/libEF.cpp\end{CompactItemize} |
---|