sablib
Loading...
Searching...
No Matches
arpls.cpp File Reference

Baseline estimation using asymmetrically reweighted Penalized Least Squares(arPLS)(implementation). More...

#include <cmath>
#include <limits>
#include "arpls.h"

Go to the source code of this file.

Functions

const std::vector< double > sablib::BaselineArPLS (std::vector< double > &y, const double lambda, const unsigned int s=2, const unsigned int loop=50, const double eps=1e-3)
 Performs baseline estimation using asymmetrically reweighted Penalized Least Squares(arPLS).

Detailed Description

Baseline estimation using asymmetrically reweighted Penalized Least Squares(arPLS)(implementation).

Author
Izadori

Definition in file arpls.cpp.

Function Documentation

◆ BaselineArPLS()

const std::vector< double > sablib::BaselineArPLS ( std::vector< double > & y,
const double lambda,
const unsigned int s = 2,
const unsigned int loop = 50,
const double eps = 1e-3 )

Performs baseline estimation using asymmetrically reweighted Penalized Least Squares(arPLS).

Parameters
yThe input data for baseline estimation.
lambdaSmoothing parameter.
sThe order of the difference (usually s = 1, 2, or 3).
loopMaximum number of iterations.
epsConvergence threshold.
Returns
The estimated baseline.
Exceptions
std::invalid_argumentOne or more parameters are wrong.

Definition at line 17 of file arpls.cpp.