Xavier Holt deleted subsubsection_Finding_an_Interval_begin__.tex  over 8 years ago

Commit id: a3b2c9400babcd2c1c9d97a7e81aca04a8f0be13

deletions | additions      

       

It_is_thereby_clear_that__.md  subsection_Formulating_the_Integral_In__.tex  Slice_Sampling_Slice_sampling_is__.md  subsubsection_Finding_an_Interval_begin__.tex  Bayesian_Optimisation_over_the_Hyperparameters__.md           

\subsubsection{Finding an Interval}  \begin{lstlisting}[mathescape] % Start your code-block  # Input  # - f: a function proportional to the target density  # - ${x_0}$: the current point  # - y: the sampled vertical level defining the slice  # - w: estimated typical slice size  # - p: parameter limiting size of slice to $2^pw$  $\\ \\ \\$  U ~ Uniform(0,1)  L $\leftarrow$ $x_0$ - w * U  R $\leftarrow$ L + w  K $\leftarrow$ p  while K > 0 and {y < f(L) or y < f(R)}:  V ~ Uniform(0,1)  if V < 1/2 then L $\leftarrow$ L - (R-L)  else R $\leftarrow$ R + (R-L)  K $\leftarrow$ K - 1    return I = (L,R)  \end{lstlisting}