Mercurial > hg > smallbox
comparison DL/two-step DL/SMALL_two_step_DL.m @ 210:f12a476a4977 luisf_dev
Added help comments to SMALL_two_step_DL.m
author | bmailhe |
---|---|
date | Wed, 21 Mar 2012 17:25:40 +0000 |
parents | dfa795944aae |
children | fd0b5d36f6ad |
comparison
equal
deleted
inserted
replaced
209:dfa795944aae | 210:f12a476a4977 |
---|---|
1 function DL=SMALL_two_step_DL(Problem, DL) | 1 function DL=SMALL_two_step_DL(Problem, DL) |
2 | |
3 %% DL=SMALL_two_step_DL(Problem, DL) learn a dictionary using two_step_DL | |
4 % The specific parameters of the DL structure are: | |
5 % -name: can be either 'ols', 'opt', 'MOD', KSVD' or 'LGD'. | |
6 % -param.learningRate: a step size used by 'ols' and 'opt'. Default: 0.1 | |
7 % for 'ols', 1 for 'opt'. | |
8 % -param.flow: can be either 'sequential' or 'parallel'. De fault: | |
9 % 'sequential'. Not used by MOD. | |
10 % -param.coherence: a real number between 0 and 1. If present, then | |
11 % a low-coherence constraint is added to the learning. | |
12 % | |
13 % See dico_update.m for more details. | |
2 | 14 |
3 % determine which solver is used for sparse representation % | 15 % determine which solver is used for sparse representation % |
4 | 16 |
5 solver = DL.param.solver; | 17 solver = DL.param.solver; |
6 | 18 |
55 else | 67 else |
56 flow = 'sequential'; | 68 flow = 'sequential'; |
57 end | 69 end |
58 | 70 |
59 % learningRate. If the type is 'ols', it is the descent step of | 71 % learningRate. If the type is 'ols', it is the descent step of |
60 % the gradient (typical choice: 0.1). If the type is 'mailhe', the | 72 % the gradient (default: 0.1). If the type is 'mailhe', the |
61 % descent step is the optimal step*rho (typical choice: 1, although 2 works | 73 % descent step is the optimal step*rho (default: 1, although 2 works |
62 % better). Not used for MOD and KSVD. | 74 % better). Not used for MOD and KSVD. |
63 | 75 |
64 if isfield(DL.param,'learningRate') | 76 if isfield(DL.param,'learningRate') |
65 learningRate = DL.param.learningRate; | 77 learningRate = DL.param.learningRate; |
66 else | 78 else |