UQTk: Uncertainty Quantification Toolkit 3.1.5
bcs.cpp File Reference

Implementation of Bayesian compressive sensing algorithm. More...

#include "stdlib.h"
#include "stdio.h"
#include "math.h"
#include "assert.h"
#include <sstream>
#include <fstream>
#include "bcs.h"
#include "tools.h"
#include "ftndefs.h"
#include "deplapack.h"
#include "arrayio.h"
#include "arraytools.h"

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)
 The implementation of the Bayesian Compressive Sensing algorithm using Laplace Priors.
 
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

Implementation of Bayesian compressive sensing algorithm.

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 )

The implementation of the Bayesian Compressive Sensing algorithm using Laplace Priors.

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