netket_foundation.stats.ReplicaStats#
- class netket_foundation.stats.ReplicaStats[source]#
Bases:
StatsA batched
netket.stats.Stats: one entry per replica.Every field carries a leading
(n_replicas,)axis, so this is a genuine pytree of batched arrays (built byreplica_statistics()viajax.vmap) rather than a Pythonlist.It still behaves like the old
list[Stats]:len(rs)is the number of replicas,rs[i]and iteration yield the scalarStatsof one replica (in replica order). The aggregate training-loss summary is exposed undertotal.- Attributes
-
- total[source]#
Aggregate the per-replica statistics into a single summary.
The combination rule used for the foundational training loss:
mean: average of the replica means,error_of_mean: quadrature sum of the replica errors divided by the number of replicas (standard error of the grand mean),variance: average of the replica variances,tau_corr: average of the replica autocorrelation times,R_hat: maximum across replicas (the most conservative convergence indicator),tau_corr_max: maximum across replicas (the most conservative autocorrelation-time estimate).
- Methods
-
- classmethod stack(stats)[source]#
Build a
ReplicaStatsby stacking scalarStats.Used for the online-statistics path, which produces one
Statsper replica that cannot be obtained viavmap.- Return type:
- Parameters: