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")