-
3.39.23
|
The matfaust tools namespace. More...
Functions | |
function | omp (y, D, varargin) |
Runs the greedy OMP algorithm optimized by Cholesky decomposition. More... | |
The matfaust tools namespace.
function matfaust::tools::omp | ( | y | , |
D | , | ||
varargin | |||
) |
Runs the greedy OMP algorithm optimized by Cholesky decomposition.
Usage
x=omp(y, D) runs the algorithm with the default configuration which is equivalent to x=omp(y, D, 'maxiter', length(y), 'verbose', false).
x=omp(y, D, 'maxiter', N) stops the algorithm after N iterations.
x=omp(y, D, 'tol', 10^-16) runs the algoritm until the relative error is lower or equal to 10**-16. This is equivalent to x=omp(y, D, 'tol', 10^-16, 'relerr', true)
x=omp(y, D, 'maxiter', N, 'tol', 10^-16) runs at most N iterations until the tol
precision is reached.
x=omp(y, D, 'tol', 10^-16, 'relerr', false) runs the algorithm until the absolute error is lower or equal to 10**-16.
y | The vector to approximate by D*x. |
D | The dictionary as a matrix or a Faust. |
'maxiter',number | (optional) To define a maximum number of iterations (by default this length(y)). |
'tol',number | (optional) To define the error value used for the relative or absolute error (by default this is 0, for not stopping on any error criterion). |
'relerr',true | (optional) To define a stopping criterion based on the relative error (this is the default error). |
'relerr',false | (optional) To define a stopping criterion based on the absolute error. |
'verbose',true | (optional) To enable the verbosity. |
'verbose',false | (optional) To disable the verbosity (this is the default option). |
Example: