Scaling

A commonly used strategy in models of the PES is to scale the raw local energy predictions by some scale parameter (derived in a graph_pes.GraphPESModel.pre_fit() step). This has the effect of allowing models to output ~unit normally distributed predictions (which is often an implicit assumption of e.g. NN components) before having these scaled to the natural scale of the labels in question.

class graph_pes.models.components.scaling.LocalEnergiesScaler[source]

Scale the local energies by a per-element scaling factor.

See guess_per_element_mean_and_var() for how the scaling factors are estimated from the training data.

per_element_scaling

The per-element scaling factors. (PerElementParameter)

forward(local_energies, graph)[source]

Scale the local energies by the per-element scaling factor.

Return type:

Tensor

pre_fit(graphs)[source]

Pre-fit the per-element scaling factors.

Parameters:

graphs (AtomicGraph) – The training data.

non_decayable_parameters()[source]

The per_element_scaling parameter should not be decayed.

Return type:

list[Parameter]