spectrochempy.pareto_scale๏ƒ

pareto_scale(dataset, dim='y', inplace=False)[source]๏ƒ

Apply Pareto scaling along a dimension.

Pareto scaling is a compromise between mean-centering and autoscaling: the data are centered and divided by the square-root of the standard deviation.

\[x_{ij}^\prime = \frac{x_{ij} - \bar{x}_j}{\sqrt{s_j}}\]
Parameters:
  • dataset (NDDataset) โ€“ The input data.

  • dim (str or int, optional, default:โ€™yโ€™) โ€“ Dimension along which the statistics are computed.

  • inplace (bool, optional, default:False) โ€“ If True, scaling is performed in place.

Returns:

NDDataset โ€“ The Pareto-scaled dataset.

Examples

>>> dataset = scp.read("irdata/nh4y-activation.spg")
>>> nd = dataset.pareto_scale(dim="y")