Result and summary fields¶
What a result holds¶
The attributes of a telescopic.Result in four groups, with arrows to the
methods that read its signed measures and its meeting times; tv_bound counts a
censored pair as meeting at max_iter + 1.¶
Attribute |
Content |
|---|---|
|
\(R\), the number of replicates whose pairs met, and the number of pairs censored at |
|
the settings of the run (Settings) |
|
the parameter names and the dimension \(d\) |
|
the replicates’ signed measures |
|
for every replicate, censored ones included: its index, its meeting time ( |
|
the evaluations of the log-density and of its gradient, and the seconds, of the replicates, without tuning, the meeting-time pilot and the gradient check, which runs when the sampler is built |
|
the frozen kernel and the initial distribution |
|
the report of the tuning chains, and the meeting times of the lag-1 pilot pairs that chose |
|
the root |
|
whether a requested replicate never ran (Parallel runs) |
|
the run’s |
|
the replicates that an error stopped while they ran and that have not run since (Continuing after an error) |
The summary¶
telescopic.Result.summary() returns a telescopic.Summary. It shows a table
with one row per parameter, then the settings and diagnostics of the run and the warnings
that apply, one per line. A notebook shows it in HTML, as here; print gives it as text,
whose lines below the table are wrapped at 80 characters:
summary = result.summary()
summary
| mean | standard_error | std | q16 | q50 | q84 | |
|---|---|---|---|---|---|---|
| x0 | 0.00130564 | 0.00466596 | 0.998981 | -0.992482 | 0.000124855 | 1.00025 |
| x1 | 0.000582617 | 0.00462841 | 0.999527 | -0.99266 | 0.000115797 | 0.995682 |
- R = 1000, k = 37, m = 370, lag = 37, thin = 1
- kernel: RandomWalk(cov=<2x2>, scale=None, coupling='reflection')
- meeting times: median 46, 90% 60, 99% 75, max 103; censored 0
- tail index of the meeting times: 4.02
- cost per replicate: 381.1 kernel applications, 0.0005 s; relative cost 1.14
- pairs meeting after k + lag: 1.3% (at most 2.1% at 95%)
- largest share of one replicate in a variance: 2%, for the variance of x1
The columns of the table:
mean: the average of the replicates’ estimates of the parameter’s mean, which is unbiased;standard_error: its Monte Carlo error, valid as the number of replicates grows, however short each run.std: \(\sqrt{\max(0, \widehat{\mathrm{Var}})}\), from the unbiased estimate of the variance; consistent, not unbiased.q16,q50andq84: the 16%, 50% and 84% quantiles of the pooled signed measures; consistent, not unbiased.
The lines below it:
\(R\), the settings
k,m,lagandthin(Settings), and the kernel, whose floating-point parameters show to 4 significant figures (summary.footerkeeps every digit);with
keep, which replicates each column comes from: the mean, its standard error and the standard deviation from all \(R\), and the quantiles from the kept replicates, or “no kept replicate” when none met, with the quantile columns thennan(Keeping a subset);the median, the 90% and 99% quantiles and the maximum of the meeting times of every pair, where censored pairs sort above every pair that met, and a quantile that falls on one shows as
>and the cap, such as> 12formax_iter=12; from 500 replicates, the tail index of those that met (tail); and the number of censored pairs (censored);the mean cost of a replicate in kernel applications and in seconds, and the relative cost, the mean cost over \(m - k + 1\) (Settings);
the fraction of pairs that met after
k + lag, censored ones included, with a one-sided 95% upper bound: only these replicates carry a bias correction, and withlag = kthe fraction is close to the bound on the total variation distance atk(Distance to stationarity);the largest share of one replicate in the variance of the estimate of a coordinate’s mean or variance, and that estimate (
variance);for an interrupted run, that its estimates are consistent but not exactly unbiased (Interrupting a run); while an error has abandoned replicates, that the estimates leave out replicates selected for long meeting times, in its place (Continuing after an error);
each warning that applies (Warnings).
summary.table holds the columns as arrays, and summary.footer the rest as a
dictionary, with keep, n_kept and abandoned, the number of abandoned replicates. telescopic.Summary.to_dict() converts both to Python numbers, and
telescopic.Summary.to_pandas() returns the table as a pandas.DataFrame indexed by
parameter name (it needs the pandas extra):
summary.to_dict()["parameters"]["x0"]
{'mean': 0.001305641597757814,
'standard_error': 0.0046659580817638375,
'std': 0.9989809040469655,
'q16': -0.9924816684420437,
'q50': 0.00012485544571522178,
'q84': 1.0002502577970125}
The diagnostics of a run¶
telescopic.Result.diagnostics() returns the diagnostics that the summary prints, as
a dictionary; The summary defines each line of the summary.
result.diagnostics()
{'meeting_time_50': 46.0,
'meeting_time_90': 60.0,
'meeting_time_99': 75.0,
'meeting_time_max': 103.0,
'tail_index': 4.018532409639094,
'censored': 0,
'late_fraction': 0.013,
'late_fraction_upper': 0.020589286529908272,
'tv_bound_at_k': 0.013,
'variance_share': 0.019296116850431644,
'variance_share_of': 'the variance of x1',
'variance_share_replicate': 654,
'mean_cost': 381.119,
'seconds_per_replicate': 0.0005003891609999868,
'relative_cost': 1.1410748502994013}
meeting_time_50,meeting_time_90,meeting_time_99,meeting_time_maxandcensored: the quantiles of the meeting times of every pair, each an observed meeting time from the sorted values, where censored pairs sort above every pair that met, and the number of censored pairs. A quantile that falls on a censored pair isinf.tail_index: the tail index of \(\tau - L + 1\), the power \(\alpha\) at which the probability of a value above \(t\) falls as \(t^{-\alpha}\), by Hill’s estimate from the largest values;nanbelow 500 replicates or behind ties (tail).late_fractionandlate_fraction_upper: the fraction of pairs that met afterk + lag, censored ones included, and its one-sided 95% Clopper-Pearson upper bound, an exact binomial confidence bound, which stays informative when the fraction is 0. The fraction is the leading term oftv_bound_at_k, the TV bound at \(k\), and withlag = kthe two are close.variance_share,variance_share_ofandvariance_share_replicate: the largest share of one replicate in the variance of the estimate of a coordinate’s mean or variance, with each replicate’s second moments taken about the mean estimate, that estimate, such as"the variance of x1", and the index of that replicate;nan,NoneandNonebelow 2 replicates (variance).mean_cost,seconds_per_replicateandrelative_cost: the cost of a replicate (Settings).