Skip to content

Commit

Permalink
Updated manuscript
Browse files Browse the repository at this point in the history
  • Loading branch information
andycasey committed Aug 24, 2014
1 parent 737eef0 commit 612ef8b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 23 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
50 changes: 27 additions & 23 deletions document/manuscript.tex
Original file line number Diff line number Diff line change
Expand Up @@ -279,25 +279,29 @@ \section{The Generative Model}
informative, so conceptually a fit to the expected fluxes $E_{i}$ is generally
preferred wherever possible. For brevity I define $\bm{\kappa} \equiv (\bm{\psi},\{z,\sigma_s,\{c_k\}_{k=0}^{m},f\}_{0}^{N_{c}})$, and the likelihood for the mixture model is given by

\begin{equation}
\mathcal{L} = \prod_{i=1}^{N}\,\left[\left(1 - P_{o}\right)\times{}p_{model}\left(F_i|\lambda_i,\sigma_{i},\bm{\kappa}\right) + P_{o}\times{}p_{outlier}\left(F_i|\lambda_i,\sigma_i,\bm{\kappa},V_{o},P_o\right)\right]
\end{equation}
\begin{multline}
\mathcal{L} = \prod_{i=1}^{N}\,\left[\left(1 - P_{o}\right)\times{}p_{model}\left(F_i|\lambda_i,\sigma_{i},\bm{\kappa}\right)\right. \\
+ \left. P_{o}\times{}p_{outlier}\left(F_i|\lambda_i,\sigma_i,\bm{\kappa},V_{o},P_o\right)\right]
\end{multline}

\noindent{}where $p_{model}$ refers to $p$ in Equation \ref{eq:p_model} and

\begin{equation}
p_{outlier}\left(F_i|\lambda_i,\sigma_i,\bm{\kappa},V_{o},P_o\right) = \frac{1}{\sqrt{2\pi\left(s_{i}^2 + V_{o}^2\right)}} \exp\left(-\frac{[F_i - C_i]^2}{2\left[s_{i}^2 + V_{o}^2\right]}\right)
\end{equation}
\begin{multline}
p_{outlier}\left(F_i|\lambda_i,\sigma_i,\bm{\kappa},V_{o},P_o\right) = \dots \\
\frac{1}{\sqrt{2\pi\left(s_{i}^2 + V_{o}^2\right)}} \exp\left(-\frac{[F_i - C_i]^2}{2\left[s_{i}^2 + V_{o}^2\right]}\right)
\end{multline}

\noindent{}such that the likelihood $\mathcal{L}$ becomes:

\begin{equation}
\mathcal{L} = \prod_{i=1}^{N} \left[ \frac{1-P_o}{\sqrt{2\pi{}s_{i}^2}}\,\exp\,\left(-\frac{[F_i - E_i]^2}{2s_{i}^{2}}\right) + \frac{P_o}{\sqrt{2\pi\left[s_{i}^2 + V_o\right]}}\,\exp\,\left(-\frac{[F_i - C_i]^2}{2\left[s_{i}^{2} + V_o\right]}\right)\right]
\begin{multline}
\mathcal{L} = \prod_{i=1}^{N} \left[ \frac{1-P_o}{\sqrt{2\pi{}s_{i}^2}}\exp\left(-\frac{[F_i - E_i]^2}{2s_{i}^{2}}\right) \right.\\
\left. + \frac{P_o}{\sqrt{2\pi\left[s_{i}^2 + V_o\right]}}\exp\left(-\frac{[F_i - C_i]^2}{2\left[s_{i}^{2} + V_o\right]}\right)\right]
\label{eq:full_likelihood}
\end{equation}
\end{multline}

I define the full parameter space with $\bm{\theta} \equiv \left(\bm{\psi},\{z,\sigma_s,\{c_{b_k}\}_{k=0}^{m},f\}_{b=0}^{N_{c}},V_o,P_o\right)$. From Bayes theorem the posterior probability
I define the full parameter space with ${\bm{\theta} \equiv \left(\bm{\psi},\{z,\sigma_s,\{c_{b_k}\}_{k=0}^{m},f\}_{b=0}^{N_{c}},V_o,P_o\right)}$. From Bayes theorem the posterior probability
distribution for $\bm{\theta}$ (up to a constant) is given by

\begin{eqnarray}
\mathcal{P} & \propto & likelihood \times prior \nonumber \\
p(\bm{\theta}|\{F_i\}_{i=1}^{N}) & \propto & p(\{F_i\}_{i=1}^{N}|\bm{\theta})\,\times\,p(\bm{\theta})
Expand Down Expand Up @@ -385,7 +389,7 @@ \subsection{Monte-Carlo Markov Chain Sampling}
by \citet{goodman;weare}, and implemented by \citet{emcee}. The Metropolis-Hastings
MCMC algorithm is employed by default. \sick{} allows for the model settings to
be specified in a human-readable \textsc{yaml}- or \textsc{json}-formatted
configuration file\footnote{The reader is referred to the online documentation
configuration file\footnote{The reader is referred to the online documentation at http://astrowizici.st/sick/
for an example.}, where the number of Goodman \& Weare walkers can be specified,
as well as the number of samples to perform. When the optimisation step is used,
the initial points are taken from a small multi-dimensional ball around the
Expand All @@ -400,15 +404,15 @@ \subsection{Monte-Carlo Markov Chain Sampling}
uninformative prior distributions are assumed (for all channels, where appropriate):

\begin{eqnarray}
p\left(\bm{\psi}_{dim}\right) &=& \mathcal{U}\left(\min\left[\bm{\psi}_{dim}\right], \max\left[\bm{\psi}_{dim}\right]\right) \\
p\left(P_o\right) &=& \mathcal{U}\left(0, 1\right) \\
p\left(\log{f}\right) &=& \mathcal{U}\left(-10, 1\right) \\
p\left(V_o,\sigma_s\right) &=& \left\{
p\left(\bm{\psi}_{dim}\right) &\,=\,& \mathcal{U}\left(\min\left[\bm{\psi}_{dim}\right], \max\left[\bm{\psi}_{dim}\right]\right) \\
p\left(P_o\right) &\,=\,& \mathcal{U}\left(0, 1\right) \\
p\left(\log{f}\right) &\,=\,& \mathcal{U}\left(-10, 1\right) \\
p\left(V_o,\sigma_s\right) &\,=\,& \left\{
\begin{array}{c l}
1\,, &\mbox{for values greater than zero}\\
0\,, &\mbox{otherwise}
\end{array}\right. \\
p\left(z,\{c_k\}_{k=0}^{m}\right) &=& 1 \\
p\left(z,\{c_k\}_{k=0}^{m}\right) &\,=\,& 1 \\
\label{eq:default_priors}
\end{eqnarray}

Expand Down Expand Up @@ -449,15 +453,15 @@ \subsection{Self-consistent inference test}

\begin{figure*}
\label{fig:chains}
\includegraphics[height=\textheight]{chains.pdf}
\includegraphics[height=\textheight]{figures/chains.pdf}
\caption{Points sampled by the 200 walkers at each step during the self-consistent
inference test. The true values are marked in blue. The first 1250 steps are
discarded as the burn-in period.}
\end{figure*}

\begin{figure*}
\label{fig:corner-inference}
\includegraphics[width=\textwidth,height=\textwidth]{corner.pdf}
\includegraphics[width=\textwidth,height=\textwidth]{figures/corner.pdf}
\caption{Marginalised posterior distributions for all parameters $\bm{\theta}$
from a faux observation with spectral resolution $\mathcal{R} \sim 10,000$ and
S/N ratio $\sim{}7$\,pixel$^{-1}$. True values are marked in blue. This figure
Expand Down Expand Up @@ -490,7 +494,7 @@ \subsection{Self-consistent inference test}

\begin{figure*}
\label{fig:spectrum-inference}
\includegraphics[width=\textwidth]{spectrum.pdf}
\includegraphics[width=\textwidth]{figures/spectrum.pdf}
\caption{A faux observed spectrum (black) of $\mathcal{R} \sim 10000$ and S/N
ratio of $\sim7$ with an underestimated variance by $\sim$10\% which was used for
the self-consistent inference test. The recovered maximum likelihood model spectrum
Expand Down Expand Up @@ -546,7 +550,7 @@ \subsection{Sol}

\begin{figure*}
\label{fig:solar}
\includegraphics[width=\textwidth,height=\textwidth]{solar.pdf}
\includegraphics[width=\textwidth,height=\textwidth]{figures/solar.pdf}
\caption{Stellar parameter ($\bm{\psi}$: $T_{\rm eff}$, $\log{g}$, [Fe/H],
[$\alpha$/Fe]) posterior distributions for the GIRAFFE/FLAMES twilight spectrum.
Nuisance parameters are not shown. Maximum likelihood values for each parameter
Expand Down Expand Up @@ -620,7 +624,7 @@ \subsection{Globular Clusters}

\begin{figure}[h!]
\label{fig:clusters}
\includegraphics[width=0.5\textwidth]{clusters.pdf}
\includegraphics[width=0.5\textwidth]{figures/clusters.pdf}
\caption{Metallicities of cluster stars inferred from noisy, low-resolution
spectra obtained with the AAOmega spectrograph. The agreement with the
literature values (see text) is very reasonable.}
Expand Down Expand Up @@ -667,8 +671,8 @@ \section{Conclusion}
which includes regular reproduction of the examples presented in this \article{}.
Complete documentation is available online\footnote{astrowizici.st/sick},
which includes a number of additional examples and tutorials. In the spirit of
full scientific reproducibility, the online documentation is complemented with the
files necessary to reproduce all of the examples presented in this \article{}.
scientific reproducibility, the online documentation is complemented with the
files necessary to reproduce examples presented in this \article{}.
The source code is distributed using \textsc{git}, and hosted online at
GitHub\footnote{github.com/andycasey/sick}.

Expand Down

0 comments on commit 612ef8b

Please sign in to comment.