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 (
NDDatasetor 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 largerlamb, 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 (
intorstr, optional, default: -1,) – Dimension along which the method is applied. By default, the method is applied to the last dimension. Ifdimis specified as an integer it is equivalent to the usualaxisnumpy parameter.log_level (any of [
"INFO","DEBUG","WARNING","ERROR"], optional, default:"WARNING") – The log level at startup. It can be changed later on using theset_log_levelmethod or by changing thelog_levelattribute.