2012HackSessionNotes » History » Version 6

Version 5 (Luis Figueira, 2012-06-20 03:52 PM) → Version 6/11 (Luis Figueira, 2012-06-20 04:09 PM)

h1. 2012 Hack Session Notes

2012HackSessionNotes

h2. Using SMALLbox Add-ons



h3. Installing an add on

This section refers to the incoherentdl algorithm code tagged as ver_1.1 in the project’s Mercurial repository. To download this version please go to the project’s homepage in http://code.soundsoftware.ac.uk/projects/incoherentdl.
The incoherent dictionary learning add-on includes algorithms for learning dictionaries that are both adapted to the training data and that exhibit a low mutual coherence (defined as the maximum absolute inner product between any two different atoms) [27]. It extends
26
SMALLbox v2.0 User Documentation 27
the functionalities of the SMALL_two_step_DL toolbox which is included in the SMALLBox distribution, and is an example showing the capabilities of SMALLbox add–ons.
These are the steps needed to interface SMALLbox add-ons to the core SMALLbox distribulation:

#
dis- tribution:

*
Download the add-on distribution from: http://code.soundsoftware.ac.uk/projects/incoherentdl/files
** The version you wish to download is *version 1.1*
** unzip the downloaded file - this will create a folder named @incoherentdl-v1_1@
#
* Place the add-on code in any convenient location of your file system, and add this to your MATLAB path
** @addpath(genpath('@{incoherentdl-v1_1}'))@ addpath(genpath('/Users/luisf/incoherentdl-v1_1'))
# * Modify the relevant files in the folder @{SMALLBox Root}/config/@ {SMALLBox Root}/config/
** modify or create @{SMALLBox Root}/config/SMALL_learn_config_local.m@ modify/create SMBOX/config/SMALL_learn_config_local.m
*** @cp {SMALLBox Root}/config/SMALL_learn_local.m SMBOX/config/SMALL_learn_config_local.m@ cp SMBOX/config/SMALL_learn_local.m SMBOX/config/SMALL_learn_config_local.m
**** this the local file is not tracked by Mercurial

**** if you need to revert to the _default_ 'default' SMALLbox setting, you just need to delete/rename your local file
*** add the following code to the local config file:
<pre>
elseif strcmpi(DL.toolbox , 'SMALL_incoherentDL')
DL=SMALL_incoherentDL ( Problem , DL ) ;
 % we need to make sure that columns are normalised to % unit lenght .
for i = 1: size(DL.D,2)
DL.D(: ,i)=DL.D(: ,i)/norm(DL.D(: ,i));
end
D = DL.D;
</pre>
# * Run the @SMALLboxInit.m@ SMALLboxInit.m script to set environmental variables variables.
# * Run any function or script contained in the add-on.
** example:
*** @load test_mocod.mat@
**** located in @incoherentdl-v1_1/results/test_mocod.mat@ (but already in path)
load test_mocod.mat (incoherentdl-v1_1/results/test_mocod.mat)
*** @open SMALL_test_mocod.m@ open SMALL_test_mocod.m
**** located in @incoherentdl-v1_1/open SMALL_test_mocod.m@
*** run the code from the block that starts on line 110 (with the comment Plot Results)
**** this will display two coherence/signal to noise ratio plots based on results previously computed


h3. Creating a new add on