Statistics

class franken.rf.scaler.Statistics(input_dim=None)

Bases: object

Running statistics of GNN features, computing both per-species and global statistics.

Parameters:

input_dim (int | None) – Dimension of GNN features. If not specified will be inferred automatically when the first feature is provided. Defaults to None.

property num_species

Get the number of species present in each configuration.

update(descriptors, atomic_numbers)

Update running statistics for both per-species and global features.

Parameters:
  • descriptors (torch.Tensor) – Input features of shape (n_atoms, input_dim)

  • atomic_numbers (torch.Tensor) – Atomic numbers for each atom