Mercurial > hg > smallbox
comparison solvers/SMALL_chol.m @ 128:8e660fd14774 ivand_dev
Feature 186
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Mon, 13 Jun 2011 14:55:45 +0100 |
parents | f6cedfec9ffb |
children |
comparison
equal
deleted
inserted
replaced
126:db5a7fe1a404 | 128:8e660fd14774 |
---|---|
1 function [A]=SMALL_chol(Dict,X, m, maxNumCoef, errorGoal, varargin) | 1 function [A]=SMALL_chol(Dict,X, m, maxNumCoef, errorGoal, varargin) |
2 %% | 2 %% Implementation of OMP with Cholesky factorisation |
3 % Sparse coding of a group of signals based on a given | |
4 % dictionary and specified number of atoms to use. | |
5 % input arguments: Dict - the dictionary | |
6 % X - the signals to represent | |
7 % m - number of atoms in Dictionary | |
8 % errorGoal - the maximal allowed representation error for | |
9 % each signal. | |
10 % | |
11 % optional: if Dict is function handle then Transpose Dictionary | |
12 % handle needs to be specified. | |
13 % | |
14 % output arguments: A - sparse coefficient matrix. | |
15 % | |
16 | |
3 % | 17 % |
4 % Centre for Digital Music, Queen Mary, University of London. | 18 % Centre for Digital Music, Queen Mary, University of London. |
5 % This file copyright 2009 Ivan Damnjanovic. | 19 % This file copyright 2009 Ivan Damnjanovic. |
6 % | 20 % |
7 % This program is free software; you can redistribute it and/or | 21 % This program is free software; you can redistribute it and/or |
8 % modify it under the terms of the GNU General Public License as | 22 % modify it under the terms of the GNU General Public License as |
9 % published by the Free Software Foundation; either version 2 of the | 23 % published by the Free Software Foundation; either version 2 of the |
10 % License, or (at your option) any later version. See the file | 24 % License, or (at your option) any later version. See the file |
11 % COPYING included with this distribution for more information. | 25 % COPYING included with this distribution for more information. |
12 % | 26 % |
13 % Sparse coding of a group of signals based on a given | |
14 % dictionary and specified number of atoms to use. | |
15 % input arguments: Dict - the dictionary | |
16 % X - the signals to represent | |
17 % m - number of atoms in Dictionary | |
18 % errorGoal - the maximal allowed representation error for | |
19 % each signal. | |
20 % | |
21 % optional: if Dict is function handle then Transpose Dictionary | |
22 % handle needs to be specified. | |
23 % | |
24 % output arguments: A - sparse coefficient matrix. | |
25 % | |
26 %% | 27 %% |
27 % This Dictionary check is based on Thomas Blumensath work in sparsify 0_4 greedy solvers | 28 % This Dictionary check is based on Thomas Blumensath work in sparsify 0_4 greedy solvers |
28 explicitD=0; | 29 explicitD=0; |
29 if isa(Dict,'float') | 30 if isa(Dict,'float') |
30 D =@(z) Dict*z; | 31 D =@(z) Dict*z; |