Warning

You are reading the documentation related to the development version. Go here if you are looking for the documentation of the stable release.

spectrochempy.whittaker

whittaker(dataset, lamb=1.0, order=2, **kwargs)[source]

Smooth the data using the Whittaker smoothing algorithm.

This implementation based on the work by Eilers [2003] uses sparse matrices enabling high-speed processing of large input vectors.

Copyright M. H. V. Werts, 2017 (see LICENSES/WITTAKER_SMOOTH_LICENSE.rst)

Parameters
  • dataset (NDDataset or array-like of shape (n_observations , n_features)) – Input data, where n_observations is the number of observations and n_features is the number of features.

  • lamb (float, optional, default: 1.0) – Smoothing/Regularization parameter. The larger lamb, the smoother the data.

  • order (int, optional, default=2) – The difference order of the penalized least-squares.

  • **kwargs (keyword parameters, optional) – See Other Parameters.

Returns

NDdataset – Smoothed data.

Other Parameters
  • dim (int or str, optional, default: -1,) – Dimension along which the method is applied. By default, the method is applied to the last dimension. If dim is specified as an integer it is equivalent to the usual axis numpy parameter.

  • log_level (any of ["INFO", "DEBUG", "WARNING", "ERROR"], optional, default: "WARNING") – The log level at startup. It can be changed later on using the set_log_level method or by changing the log_level attribute.

See also

Filter

Define and apply filters/smoothers using various algorithms.

smooth

Function to smooth data using various window filters.

savgol

Savitzky-Golay filter.

savgol_filter

Alias of savgol