netket.stats.Stats#

class netket.stats.Stats[source]#

Bases: object

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

Inheritance
Inheritance diagram of netket.stats.Stats
Attributes
R_hat: float = nan#

Estimator of the split-Rhat convergence estimator.

The split-Rhat diagnostic is based on comparing intra-chain and inter-chain statistics of the sample and is thus only available for 2d-array inputs where the rows are independently sampled MCMC chains. In an ideal MCMC samples, R_hat should be 1.0. If it deviates from this value too much, this indicates MCMC convergence issues. Thresholds such as R_hat > 1.1 or even R_hat > 1.01 have been suggested in the literature for when to discard a sample. (See, e.g., Gelman et al., Bayesian Data Analysis, or Vehtari et al., arXiv:1903.08008.)

error_of_mean: float = nan#

Estimate of the error of the mean.

mean: float | complex = nan#

The mean value.

shape#

Shape of the estimated quantity — always () for scalar Stats.

tau_corr: float = nan#

Estimate of the autocorrelation time (in dimensionless units of number of steps).

This value is estimated with a blocking algorithm by default, but the result is known to be unreliable. A more precise estimator based on the FFT transform can be used by setting the environment variable NETKET_EXPERIMENTAL_FFT_AUTOCORRELATION=1. This estimator is more computationally expensive, but overall the added cost should be negligible.

tau_corr_max: float = nan#

Estimate of the maximum autocorrelation time among all Markov chains.

This value is only computed if the environment variable NETKET_EXPERIMENTAL_FFT_AUTOCORRELATION is set.

variance: float = nan#

Estimation of the variance of the data.

Methods
imag()[source]#
real()[source]#
replace(**updates)[source]#

Returns a new object replacing the specified fields with new values.

to_compound()[source]#
to_dict()[source]#