UQTk: Uncertainty Quantification Toolkit 3.1.5
bcs.h File Reference

Header for the implementations of Bayesian compressive sensing algorithm. More...

#include "Array1D.h"
#include "Array2D.h"

Go to the source code of this file.

Macros

#define MAX_IT   1000
 

Functions

void WBCS (Array2D< double > &PHI, Array1D< double > &y, Array1D< double > &sigma2, double eta, Array1D< double > &lambda_init, int adaptive, int optimal, double scale, int verbose, Array1D< double > &weights, Array1D< int > &used, Array1D< double > &errbars, Array1D< double > &basis, Array1D< double > &alpha, Array2D< double > &Sig)
 Implements weighted version of the original Bayesian Compressive Sensing algorithm.
 
void BCS (Array2D< double > &PHI, Array1D< double > &y, double &sigma2, double eta, Array1D< double > &lambda_init, int adaptive, int optimal, double scale, int verbose, Array1D< double > &weights, Array1D< int > &used, Array1D< double > &errbars, Array1D< double > &basis, Array1D< double > &alpha, double &lambda)
 Essentially same functionality as WBCS, but slightly altered I/O.
 

Detailed Description

Header for the implementations of Bayesian compressive sensing algorithm.

Macro Definition Documentation

◆ MAX_IT

#define MAX_IT   1000

Function Documentation

◆ BCS()

void BCS ( Array2D< double > & PHI,
Array1D< double > & y,
double & sigma2,
double eta,
Array1D< double > & lambda_init,
int adaptive,
int optimal,
double scale,
int verbose,
Array1D< double > & weights,
Array1D< int > & used,
Array1D< double > & errbars,
Array1D< double > & basis,
Array1D< double > & alpha,
double & lambda )

Essentially same functionality as WBCS, but slightly altered I/O.

Note
Kept for backward compatibility with PyUQTk and BCS tests

◆ WBCS()

void WBCS ( Array2D< double > & PHI,
Array1D< double > & y,
Array1D< double > & sigma2,
double eta,
Array1D< double > & lambda_init,
int adaptive,
int optimal,
double scale,
int verbose,
Array1D< double > & weights,
Array1D< int > & used,
Array1D< double > & errbars,
Array1D< double > & basis,
Array1D< double > & alpha,
Array2D< double > & Sig )

Implements weighted version of the original Bayesian Compressive Sensing algorithm.

Note
This function has been written relying on the algorithm and MATLAB code presented in http://ivpl.eecs.northwestern.edu/research/projects/bayesian-compressive-sensing-using-laplace-priors and references therein
Todo
The array manipulations are not optimized - perhaps they need to be reconsidered using, say, fortran matrix-vector manipulation routines
Parameters
[in]PHI: design matrix
[in]y: data vector
[in,out]sigma2: initial noise variance (usually var(y)/1e2) : re-estimated on output
[in]eta: stopping criterion (usually 1e-5)
[in]lambda_init: regularization weight vector, if empty array, it automatically computes the optimal, uniform weights
[in]adaptive: generate basis for adaptive CS (usually 0)
[in]optimal: use the rigorous implementation of adaptive CS (usually 1)
[in]scale: diagonal loading parameter (usually 0.1)
[in]verbose: verbosity flag
[out]weights: sparse weights
[out]used: the positions of sparse weights
[out]errbars: one standard deviation around the sparse weights
[out]basis: if adaptive==1, then this is the next projection vector, see [Ji:2008]
[out]alpha: estimated sparse hyperparameters (1/gamma), see [Babacan:2010]
[out]Sig: covariance matrix of the weights

Implements weighted version of the original Bayesian Compressive Sensing algorithm.

Note
This function has been written relying on the algorithm and MATLAB code presented in http://ivpl.eecs.northwestern.edu/research/projects/bayesian-compressive-sensing-using-laplace-priors and references therein
Todo
The array manipulations are not optimized - perhaps they need to be reconsidered using, say, fortran matrix-vector manipulation routines