Baseline estimation and subtraction using Baseline Estimation And Denoising using Sparsity(BEADS).
More...
#include <stdexcept>
#include <tuple>
#include <vector>
Go to the source code of this file.
|
| const std::tuple< std::vector< double >, std::vector< double > > | sablib::BaselineBeads (const std::vector< double > &y, const unsigned int s, const double frequency, const double r, const double lambda0, const double lambda1, const double lambda2, const unsigned int loop=30, const double eps=1e-3, const BeadsPenalty penalty=BeadsPenalty::L1_v2) |
| | Performs baseline estimation and denoising using Sparsity (BEADS).
|
Baseline estimation and subtraction using Baseline Estimation And Denoising using Sparsity(BEADS).
- Author
- Izadori
References:
Definition in file beads.h.
◆ BeadsPenalty
Penalty types for the BEADS algorithm.(see Table 1 in Duval's paper).
| Enumerator |
|---|
| L1_v1 | Penalty type 1, using phi-B(x) function and it's derivative.
|
| L1_v2 | Penalty type 2, using phi-C(x) function and it's derivative.
|
Definition at line 24 of file beads.h.
◆ BaselineBeads()
| const std::tuple< std::vector< double >, std::vector< double > > sablib::BaselineBeads |
( |
const std::vector< double > & | y, |
|
|
const unsigned int | s, |
|
|
const double | frequency, |
|
|
const double | r, |
|
|
const double | lambda0, |
|
|
const double | lambda1, |
|
|
const double | lambda2, |
|
|
const unsigned int | loop = 30, |
|
|
const double | eps = 1e-3, |
|
|
const BeadsPenalty | penalty = BeadsPenalty::L1_v2 ) |
Performs baseline estimation and denoising using Sparsity (BEADS).
- Parameters
-
| y | The input data. |
| s | Order of the derivative for baseline sparsity (typically 1 or 2). |
| frequency | Sampling frequency of the signal. |
| r | High-pass filter parameter (cut-off frequency relative to sampling frequency). |
| lambda0 | Sparsity parameter for the baseline. |
| lambda1 | Sparsity parameter for the first-order derivative of the signal. |
| lambda2 | Sparsity parameter for the second-order derivative of the signal. |
| loop | Maximum number of iterations. |
| eps | Convergence threshold. |
| penalty | Penalty type (L1_v1 or L1_v2). |
- Returns
- A tuple containing (baseline, denoised signal).
- Exceptions
-
| std::invalid_argument | One or more parameters are wrong. |
Definition at line 70 of file beads.cpp.