data.calculate_stats

data.calculate_stats(dataloader: AtomsLoader, divide_by_atoms: Dict[str, bool], atomref: Dict[str, torch.Tensor] | None = None) Dict[str, Tuple[torch.Tensor, torch.Tensor]][source]

Use the incremental Welford algorithm described in [h1] to accumulate the mean and standard deviation over a set of samples.

References:

param dataset:

atoms data set

param divide_by_atoms:

dict from property name to bool: If True, divide property by number of atoms before calculating statistics.

param atomref:

reference values for single atoms to be removed before calculating stats

Returns: