Preprocessing data#

Change raw feature vectors into more suitable representations.

class equisolve.numpy.preprocessing.StandardScaler(parameter_keys: List[str] | str, with_mean: bool = True, with_std: bool = True, column_wise: bool = False, rtol: float = 0.0, atol: float = 1e-12)#

Bases: TransformerModule

Standardize features by removing the mean and scaling to unit variance.

Parameters:
  • parameter_keys – Parameters to perform the standardization for. Examples are "values", "positions", "cell" or a combination of these.

  • with_mean – If True, center the data before scaling. If False, keep the mean intact. Because all operations are consistent wrt. to the derivative, the mean is only taken from the values, but not from the gradients, since ∇(X - mean) = ∇X

  • with_std – If True, scale the data to unit variance. If False, keep the variance intact

  • column_wise – If True, normalize each column separately. If False, normalize the whole matrix with respect to its total variance.

  • rtol – The relative tolerance for the optimization: variance is considered zero when it is less than abs(mean) * rtol + atol.

  • atol – The relative tolerance for the optimization: variance is considered zero when it is less than abs(mean) * rtol + atol.