Notation¶
Each entry maps a symbol of Theory to the argument, attribute or function
that holds it in the code. sample stands for telescopic.sample(), sampler for a
telescopic.CoupledSampler, result for a telescopic.Result, and
estimate for the telescopic.Estimate that result.estimate(h) returns. The
section headings follow those of Theory.
Coupled chains¶
- \(\pi\)
The target.
log_probcomputes \(\log\pi\) up to a constant, andgradits gradient \(\nabla\log\pi\), orlog_prob_and_gradboth in one call, all arguments ofsampleandsampler.- \(\pi_0\)
The initial distribution: the argument
init, andresult.initial.- \(P\), \(\bar P\)
The kernel and its coupling: the argument
kernel,sampler.kernelandresult.kernel. A kernel applies \(P\) instep()and \(\bar P\) incoupled_step(); the argumentcouplingofRandomWalk,GibbsandMetropolisHastingschooses among their couplings.- \(\pi_t\)
The law of \(X_t\). No attribute holds it;
result.tv_bound(t)bounds its distance to \(\pi\) (below).- \(d\)
The dimension:
result.ndimandsampler.ndim.- \(L\)
The lag: the argument
lag, andresult.lag.- \(k\), \(m\)
The first and the last averaged times: the arguments
kandm, andresult.kandresult.m.- \(X_t\), \(Y_{t-L}\)
The two chains of a pair. A result does not store them; the atoms of its signed measure are their states at the times that the estimator uses, and
result.chains()returns \(X_t\) at the averaged times \(t \in S\), shaped(n_kept, len(S), d).telescopic.engine.run()withkeep_paths=Truereturns the whole paths.- \(\tau\)
The meeting time:
result.meeting_times, one per pair,inffor a censored pair. The meeting times of the lag-1 pilot pairs aresampler.pilotandresult.pilot.
The telescoping sum and the time-averaged estimator¶
- \(h\)
The test function, the argument
hofestimate(), which maps points of shape(n, d)to values of shape(n,)or(n, p).- \(\Delta_t\), \(H_k\)
Not stored: each difference enters a replicate’s signed measure as two atoms, \(X_t\) with weight \(c_t\) and \(Y_{t-L}\) with weight \(-c_t\).
- \(H^{(L)}_{k:m}\), \(H_S\)
One replicate’s estimate:
estimate.replicates[r], whichresult.measure.per_replicate(h)also returns. \(\bar H\), their mean, isestimate.value.- \(\mathrm{MCMC}_{k:m}\)
The average of \(h\) over the averaged states of \(X\), which
result.chains()returns, without the bias correction; withthinabove 1, over the times of \(S\).- \(\mathrm{BC}_{k:m}\)
The bias correction: \(H_S\) minus the average of \(h\) over
result.chains().- \(v_t\), \(c_t\)
The weight and the coefficient of \(\Delta_t\):
correction_coefficients()returns \(c_t\), which is \(v_t/(m-k+1)\) whenthinis 1.- \(s\), \(S\)
The argument
thin, andresult.thin;averaging_times()returns \(S\).
Signed measures¶
- \(\hat\pi_r\)
The signed measures of the kept replicates that met:
result.measure, atelescopic.SignedMeasurewhoseatoms, of shape(N, d),weightsandreplicatehold every atom, its weight and the position of its replicate. \(\hat\pi_r(h)\) for every \(r\) isresult.measure.per_replicate(h).
Cost¶
- \(C\)
The cost of each replicate, in kernel applications:
result.costs.
Guarantees and estimates from many replicates¶
- \(R\)
The number of replicates: the argument
n_replicatesofsample, the number requested;CoupledSampler.run(n)addsnreplicates to those so far; andresult.n_replicates, the number whose pairs met.- \(\alpha\)
One minus the confidence level: the argument
levelofresult.estimateis \(1 - \alpha\), 0.95 by default.estimate.intervalholds the interval \(\bar H \pm t_{R-1,\,1-\alpha/2}\,\hat\sigma/\sqrt R\). Not the \(\alpha\) of the tail index.- \(a_r\), \(\bar a\), \(\sqrt{\mathrm{diag}(S_a)/R}\)
estimate.replicates[r],estimate.valueandestimate.standard_error.- \(\widehat{\mathrm{Cov}}_\pi(h)\), \(\widehat{\mathrm{Var}}\)
result.cov()andresult.var()for \(h(x) = x\);result.std()returns \(\sqrt{\max(0, \widehat{\mathrm{Var}})}\).- \(\beta\)-quantile
result.quantile(q)withq\(= \beta\).
Keeping a subset¶
- \(K\)
The argument
keep, andresult.keep;result.n_keptcounts the kept replicates that met.- \(c_r\), \(f_r\), \(S_r\)
Each replicate’s center and moments:
centerandmomentsoftelescopic.engine.Replicates, whose first \(d\) columns are \(f_r\) and the others the entries of \(S_r\).
Choosing k, m and L¶
- \(R_0\)
The number of pairs in
sampler.pilot, which holds every pilot pair run so far; the automatic settings complete it to their count, andsampler.meeting_times()adds more.- \(\beta\), \(\hat q_\beta\)
The argument
quantileoftelescopic.tuning.choose_k(), and the quantile that it takes of \(\tau - 1\).
Distance to stationarity¶
- \(d_{TV}(\pi_t, \pi)\)
Its bound:
result.tv_bound(t), ortelescopic.diagnostics.tv_bound()from meeting times, each with its standard error; its value at \(k\) isresult.diagnostics()["tv_bound_at_k"].- \(d_{W_1}(\pi_t, \pi)\)
Its bound:
result.w1_bound(t), with its standard error.
Kernel parameters¶
These symbols appear in the kernels guide and in the docstrings of the kernels, not in Theory.
- \(\Sigma\)
The argument
covof a kernel: the shape of the proposal, whose covariance is \(\lambda^2\Sigma\) forRandomWalkand \(\epsilon^2\Sigma\) forMALA, or the inverse mass matrix ofHMC.- \(\lambda\)
The argument
scaleofRandomWalk.- \(\epsilon\)
- \(j\)
The argument
jitterofHMC, which varies the step from one trajectory to the next.- \(\gamma\), \(\sigma\)
The arguments
meeting_weightandmeeting_scaleofHMC: the probability of its meeting step and the scale of that step.