comparison examples/MajorizationMinimization tests/SMALL_AMT_DL_test_KSVD_MM.m @ 161:f42aa8bcb82f ivand_dev

debug and clean the SMALLbox Problems code
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Wed, 31 Aug 2011 12:02:19 +0100
parents b14209313ba4
children 855025f4c779
comparison
equal deleted inserted replaced
155:b14209313ba4 161:f42aa8bcb82f
36 36
37 37
38 % Defining Automatic Transcription of Piano tune as Dictionary Learning 38 % Defining Automatic Transcription of Piano tune as Dictionary Learning
39 % Problem 39 % Problem
40 40
41 SMALL.Problem = generateAMT_Learning_Problem('',2048,0.75); 41 SMALL.Problem = generateAMTProblem('',2048,0.75);
42 42
43 %% 43 %%
44 % Use KSVD Dictionary Learning Algorithm to Learn 88 notes (defined in 44 % Use KSVD Dictionary Learning Algorithm to Learn 88 notes (defined in
45 % SMALL.Problem.p) using sparsity constrain only 45 % SMALL.Problem.p) using sparsity constrain only
46 46
72 % (backward compatiblity with SPARCO: solver structure communicate 72 % (backward compatiblity with SPARCO: solver structure communicate
73 % only with Problem structure, ie no direct communication between DL and 73 % only with Problem structure, ie no direct communication between DL and
74 % solver structures) 74 % solver structures)
75 75
76 SMALL.Problem.A = SMALL.DL(1).D; 76 SMALL.Problem.A = SMALL.DL(1).D;
77 SMALL.Problem.reconstruct = @(x) SMALL_midiGenerate(x, SMALL.Problem); 77 SMALL.Problem.reconstruct = @(x) AMT_reconstruct(x, SMALL.Problem);
78 78
79 %% 79 %%
80 % Initialising solver structure 80 % Initialising solver structure
81 % Setting solver structure fields (toolbox, name, param, solution, 81 % Setting solver structure fields (toolbox, name, param, solution,
82 % reconstructed and time) to zero values 82 % reconstructed and time) to zero values
214 % (backward compatiblity with SPARCO: solver structure communicate 214 % (backward compatiblity with SPARCO: solver structure communicate
215 % only with Problem structure, ie no direct communication between DL and 215 % only with Problem structure, ie no direct communication between DL and
216 % solver structures) 216 % solver structures)
217 217
218 SMALL.Problem.A = SMALL.DL(2).D; 218 SMALL.Problem.A = SMALL.DL(2).D;
219 SMALL.Problem.reconstruct=@(x) SMALL_midiGenerate(x, SMALL.Problem); 219 SMALL.Problem.reconstruct=@(x) AMT_reconstruct(x, SMALL.Problem);
220 220
221 221
222 % Call SMALL_soolve to represent the signal in the given dictionary. 222 % Call SMALL_soolve to represent the signal in the given dictionary.
223 % As a final command SMALL_solve will call above defined reconstruction 223 % As a final command SMALL_solve will call above defined reconstruction
224 % function to reconstruct the training set (Problem.b) in the learned 224 % function to reconstruct the training set (Problem.b) in the learned