[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 |
---|
| 21 | \includegraphics[width=69pt]{classegiw__coll__graph} |
---|
| 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
[172] | 27 | \hypertarget{classegiw_c52a2173c6eb1490edce9c6c7c05d60b}{ |
---|
| 28 | \hyperlink{classegiw_c52a2173c6eb1490edce9c6c7c05d60b}{egiw} (\hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}, mat V0, double nu0)} |
---|
| 29 | \label{classegiw_c52a2173c6eb1490edce9c6c7c05d60b} |
---|
[99] | 30 | |
---|
[172] | 31 | \begin{CompactList}\small\item\em Default constructor, assuming. \item\end{CompactList}\item |
---|
| 32 | \hypertarget{classegiw_1a17fdbac6c72b9c3abb97623db466c8}{ |
---|
| 33 | \hyperlink{classegiw_1a17fdbac6c72b9c3abb97623db466c8}{egiw} (\hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}, \hyperlink{classldmat}{ldmat} V0, double nu0)} |
---|
| 34 | \label{classegiw_1a17fdbac6c72b9c3abb97623db466c8} |
---|
[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 |
---|
[172] | 67 | \hypertarget{classegiw_08029c481ff95d24f093df0573879afe}{ |
---|
| 68 | double \& \hyperlink{classegiw_08029c481ff95d24f093df0573879afe}{\_\-nu} ()} |
---|
| 69 | \label{classegiw_08029c481ff95d24f093df0573879afe} |
---|
[99] | 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_036306322a90a9977834baac07460816}{ |
---|
| 73 | void \hyperlink{classegiw_036306322a90a9977834baac07460816}{pow} (double p)} |
---|
| 74 | \label{classegiw_036306322a90a9977834baac07460816} |
---|
[99] | 75 | |
---|
[172] | 76 | \begin{CompactList}\small\item\em Power of the density, used e.g. to flatten the density. \item\end{CompactList}\item |
---|
| 77 | \hypertarget{classeEF_a89bef8996410609004fa019b5b48964}{ |
---|
| 78 | virtual void \hyperlink{classeEF_a89bef8996410609004fa019b5b48964}{dupdate} (mat \&v)} |
---|
| 79 | \label{classeEF_a89bef8996410609004fa019b5b48964} |
---|
[99] | 80 | |
---|
| 81 | \begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item |
---|
[172] | 82 | \hypertarget{classeEF_6466e8d4aa9dd64698ed288cbb1afc03}{ |
---|
| 83 | virtual double \hyperlink{classeEF_6466e8d4aa9dd64698ed288cbb1afc03}{evalpdflog} (const vec \&val) const } |
---|
| 84 | \label{classeEF_6466e8d4aa9dd64698ed288cbb1afc03} |
---|
[106] | 85 | |
---|
[172] | 86 | \begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item |
---|
| 87 | \hypertarget{classeEF_c71faf4b2d153efda14bf1f87dca1507}{ |
---|
| 88 | virtual vec \hyperlink{classeEF_c71faf4b2d153efda14bf1f87dca1507}{evalpdflog} (const mat \&Val) const } |
---|
| 89 | \label{classeEF_c71faf4b2d153efda14bf1f87dca1507} |
---|
| 90 | |
---|
| 91 | \begin{CompactList}\small\item\em Evaluate normalized log-probability for many samples. \item\end{CompactList}\item |
---|
| 92 | \hypertarget{classepdf_54d7dd53a641b618771cd9bee135181f}{ |
---|
| 93 | virtual mat \hyperlink{classepdf_54d7dd53a641b618771cd9bee135181f}{sampleN} (int N) const } |
---|
| 94 | \label{classepdf_54d7dd53a641b618771cd9bee135181f} |
---|
| 95 | |
---|
[106] | 96 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
[172] | 97 | \hypertarget{classepdf_3ea597362e11a0040fe7c990269d072c}{ |
---|
| 98 | virtual double \hyperlink{classepdf_3ea597362e11a0040fe7c990269d072c}{eval} (const vec \&val) const } |
---|
| 99 | \label{classepdf_3ea597362e11a0040fe7c990269d072c} |
---|
[99] | 100 | |
---|
| 101 | \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item |
---|
[172] | 102 | \hypertarget{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{ |
---|
| 103 | const \hyperlink{classRV}{RV} \& \hyperlink{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{\_\-rv} () const } |
---|
| 104 | \label{classepdf_ca0d32aabb4cbba347e0c37fe8607562} |
---|
[99] | 105 | |
---|
[172] | 106 | \begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item |
---|
| 107 | \hypertarget{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{ |
---|
| 108 | void \hyperlink{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{\_\-renewrv} (const \hyperlink{classRV}{RV} \&in\_\-rv)} |
---|
| 109 | \label{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5} |
---|
| 110 | |
---|
| 111 | \begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize} |
---|
[99] | 112 | \subsection*{Protected Attributes} |
---|
| 113 | \begin{CompactItemize} |
---|
| 114 | \item |
---|
[172] | 115 | \hypertarget{classegiw_f343d03ede89db820edf44a6297fa442}{ |
---|
| 116 | \hyperlink{classldmat}{ldmat} \hyperlink{classegiw_f343d03ede89db820edf44a6297fa442}{V}} |
---|
| 117 | \label{classegiw_f343d03ede89db820edf44a6297fa442} |
---|
[99] | 118 | |
---|
| 119 | \begin{CompactList}\small\item\em Extended information matrix of sufficient statistics. \item\end{CompactList}\item |
---|
[172] | 120 | \hypertarget{classegiw_4a2f130b91afe84f6d62fed289d5d453}{ |
---|
| 121 | double \hyperlink{classegiw_4a2f130b91afe84f6d62fed289d5d453}{nu}} |
---|
| 122 | \label{classegiw_4a2f130b91afe84f6d62fed289d5d453} |
---|
[99] | 123 | |
---|
| 124 | \begin{CompactList}\small\item\em Number of data records (degrees of freedom) of sufficient statistics. \item\end{CompactList}\item |
---|
[172] | 125 | \hypertarget{classegiw_3d5c719f15a5527a6c62c2a53160148e}{ |
---|
| 126 | int \hyperlink{classegiw_3d5c719f15a5527a6c62c2a53160148e}{xdim}} |
---|
| 127 | \label{classegiw_3d5c719f15a5527a6c62c2a53160148e} |
---|
[99] | 128 | |
---|
[172] | 129 | \begin{CompactList}\small\item\em Dimension of the output. \item\end{CompactList}\item |
---|
| 130 | \hypertarget{classegiw_c70d13d86e0d9f0acede3e1dc0368812}{ |
---|
| 131 | int \hyperlink{classegiw_c70d13d86e0d9f0acede3e1dc0368812}{nPsi}} |
---|
| 132 | \label{classegiw_c70d13d86e0d9f0acede3e1dc0368812} |
---|
| 133 | |
---|
| 134 | \begin{CompactList}\small\item\em Dimension of the regressor. \item\end{CompactList}\item |
---|
| 135 | \hypertarget{classepdf_74da992e3f5d598da8850b646b79b9d9}{ |
---|
| 136 | \hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}} |
---|
| 137 | \label{classepdf_74da992e3f5d598da8850b646b79b9d9} |
---|
| 138 | |
---|
[99] | 139 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | \subsection{Detailed Description} |
---|
| 143 | Gauss-inverse-Wishart density stored in LD form. |
---|
| 144 | |
---|
[172] | 145 | For $p$-variate densities, given rv.count() should be $p\times$ V.rows(). |
---|
[99] | 146 | |
---|
| 147 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 148 | \item |
---|
[172] | 149 | work/git/mixpp/bdm/stat/\hyperlink{libEF_8h}{libEF.h}\item |
---|
[145] | 150 | work/git/mixpp/bdm/stat/libEF.cpp\end{CompactItemize} |
---|