spectrochempy.range_scale๏
- range_scale(dataset, dim='y', inplace=False)[source]๏
Scale data by the range along a dimension.
Each variable (or observation) is divided by its range (
max - min). This is sometimes called min-max scaling or range normalisation in the chemometric literature.\[x_{ij}^\prime = \frac{x_{ij}}{\max(x_j) - \min(x_j)}\]- Parameters:
- Returns:
NDDatasetโ The range-scaled dataset.
Examples
>>> dataset = scp.read("irdata/nh4y-activation.spg") >>> nd = dataset.range_scale(dim="y")
See also
normalizeGeneral normalisation (includes min-max to [0, 1]).