Replicates

class telescopic.engine.Replicates(
seed,
settings,
index,
meeting_time,
atoms,
weights,
owner,
distance_owner,
distance_time,
distance,
zero_density,
requested,
abandoned=<factory>,
time=<factory>,
center=<factory>,
moments=<factory>,
n_log_prob=0,
n_grad=0,
n_grad_zeroed=0,
seconds=0.0,
paths=<factory>,
)

The outputs of a set of replicates, sorted by replicate index, and their run’s settings.

Attributes:
seednumpy.random.SeedSequence

The root seed of the run, from which each replicate’s stream derives.

settingsSettings
indexndarray of int, shape (R,)

Replicate indices.

meeting_timendarray of float, shape (R,)

\(\tau = \inf\{t \ge L : X_t = Y_{t-L}\}\), or inf for a censored pair.

atoms, weights, ownerndarrays, shapes (N, d), (N,), (N,)

The signed measures of the replicates that met: the atoms, their weights (each replicate’s sum to 1), and the index of the replicate each atom belongs to. Sorted by owner, and within a replicate in record order: by time, and at each time the averaged atom first.

timendarray of int32, shape (N,)

The time \(t\) of the pair \((X_t, Y_{t-L})\) at which each atom was recorded; -1 for replicates made without it.

centerndarray, shape (R, d), or (R, 0) without keep

\(c_r = X_k\), each replicate’s first averaged state; nan for a censored pair.

momentsndarray, shape (R, p), or (R, 0) without keep

\(\hat\pi_r(x - c_r)\), then \(\hat\pi_r\) of the products \((x - c_r)_i (x - c_r)_j\) for i, j in numpy.triu_indices(d) up to \(d = 100\), or of the squares \((x - c_r)_j^2\) above it; nan for a censored pair. The rows of every replicate, whether its atoms are stored or not.

distance_owner, distance_time, distancendarrays, shape (M,)

\(\lVert X_t - Y_{t-L}\rVert\) for each pair, at each time \(L \le t < \tau\) (to the cap for a censored pair).

zero_densityndarray of int

The replicates whose \(X_0\) or \(Y_0\) has zero target density.

requestedndarray of int

The indices the run was asked for, sorted: index lacks those of replicates that an interrupted run never started, or that an error stopped.

abandonedndarray of int

The replicates in progress when an error stopped the run, sorted; nothing of them is recorded.

n_log_prob, n_gradint

Evaluations of the log-density and its gradient.

n_grad_zeroedint

Gradients taken as 0 because they were not finite where the log-density is.

secondsfloat

Wall time of the run.

pathsdict of int to (ndarray, ndarray)

With keep_paths: the paths of \(X\) and \(Y\) of each replicate, shapes (T + 1, d) and (T_Y + 1, d), where \(Y\) stops at the meeting.

property cost

Kernel applications, counting a coupled step before the meeting as two.

X runs to \(\max(s, m)\) and Y from \(L\) to \(s\), with \(s\) the time the pair stopped.

Returns:
ndarray of int, shape (R,)
property stopped

The time each pair stopped: its meeting time, or the cap if censored.

Returns:
ndarray, shape (R,)