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

Baseline estimation using Peaked Signal’s Asymmetric Least Squares Algorithm(psalsa)(implementation). More...

#include "../smoothing/whittaker.h"
#include "psalsa.h"

Go to the source code of this file.

Functions

const std::vector< double > sablib::BaselinePsalsa (std::vector< double > &y, const double lambda, const double p, const double k, const unsigned int s=2, const unsigned int loop=10, const double eps=1e-3)
 Performs baseline estimation using Peaked Signal’s Asymmetric Least Squares Algorithm (psalsa).

Detailed Description

Baseline estimation using Peaked Signal’s Asymmetric Least Squares Algorithm(psalsa)(implementation).

Author
Izadori

Definition in file psalsa.cpp.

Function Documentation

◆ BaselinePsalsa()

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

Performs baseline estimation using Peaked Signal’s Asymmetric Least Squares Algorithm (psalsa).

Parameters
yThe input data for baseline estimation.
lambdaSmoothing parameter.
pWeight (asymmetry parameter, typically 0.001 to 0.1).
kExponential decay of the weights.
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 16 of file psalsa.cpp.