FastLaplace: Implements the Fast Laplace Algorithm

Description Usage Arguments Details Value References

View source: R/RcppExports.R


Implements the fast Laplace algorithm in Rcpp. For a more user friendly implementation of this function that makes things more convenient see FindSparse.


FastLaplace(PHI, y, sigma2, eta, roundit = 0L, verbose = 0L)



typically equals the product of a measurment matrix and basis representation matrix, such as the wavelet basis. The solution vector w is assumed to be sparse in the chosen basis.


CS measurements, samples from the signal or function.


initial noise variance.


threshold in determining convergence of marginal likelihood.


whether or not to round the marginal likelihood, in order to avoid machine precision error when comparing across platforms. 0 is False, 1 is True.


print which basis are added, re-estimated, or deleted. 0 is False, 1 is True.


This code implements the fast Laplace algorithm from [1], which is based on [2]. The fast Laplace algorithm is a method used to solve the compressive sensing problem, or in general, a highly underdetermined system of equations. It does this by taking the system of equations

y = Φ w + n

and converting it into a minimization problem where we minimize the error with a constraint on w (the vector we are solving for) that enforces sparsity. The fast Laplace method uses a Bayesian framework, and in particular, uses a Laplace prior to enforce sparsity on w. See [1] for more information.


A list containing the following elements:

weights sparse weights, the non-zero values of the sparse vector w.
used the positions of the sparse weights or non-zero values.
sigma2 re-estimated noise variance.
errbars one standard deviation around the sparse weights.
alpha sparse hyperparameters (1/gamma).


[1] S. D. Babacan, R. Molina and A. K. Katsaggelos, "Bayesian Compressive Sensing Using Laplace Priors," in IEEE Transactions on Image Processing, vol. 19, no. 1, pp. 53-63, Jan. 2010.

[2] S. Ji, Y. Xue, L. Carin, "Bayesian Compressive Sensing," IEEE Trans. Signal Processing, vol. 56, no. 6, June 2008.

[3] M. Tipping and A. Faul, "Fast marginal likelihood maximisation for sparse Bayesian models," in Proc. 9th Int. Workshop Artificial Intelligence and Statistics, C. M. Bishop and B. J. Frey, Eds., 2003.

gmatt18/bcs documentation built on May 14, 2017, 12:56 p.m.