netket.stats#

Stats#

Monte Carlo statistics functions.

statistics

Returns statistics of a given array (or matrix, see below) containing a stream of data.

Stats

A dict-compatible pytree containing the result of the statistics function.

StatsBatch

Statistics for an array-valued estimator (e.g. a susceptibility matrix).

Online accumulation#

These classes accumulate statistics incrementally across batches of samples, without keeping all data in memory. OnlineStats is used internally by expect_to_precision() and check_mc_convergence() for scalar local estimators, while OnlineStatsBatch is the corresponding accumulator for multi-channel local estimators.

online_statistics

Accumulate streaming MCMC statistics across batches.

OnlineStats

Streaming accumulator for MCMC statistics across multiple batches.

online_statistics_batch

Accumulate K-channel local estimators into an OnlineStatsBatch.

OnlineStatsBatch

Batched accumulator for K OnlineStats estimators and a combining function.

Local estimators#

LocalEstimators is returned by local_estimators() for scalar observables. LocalEstimatorsBatch is returned for nonlinear observables such as the variance, where several per-sample channels must be combined through the delta method.

LocalEstimators

Per-sample scalar estimators returned by local_estimators().

LocalEstimatorsBatch

Per-sample K-channel estimators for nonlinear observables.