Mercurial > hg > camir-aes2014
comparison reproduce_AES53rd/rerun_figure3.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 % --- | |
2 % This script trains similarity measures and evaluates the | |
3 % impact of the number of hidden states as displayed in figure 3 of | |
4 % % Feature Preprocessing with RBMs for Music Similarity Learning | |
5 % Son N. Tran, Daniel Wolff, Tillman Weyde, Artur Garcez, AES53rd | |
6 % conference | |
7 % | |
8 % The output is printed in the console and plotted afterwards | |
9 % | |
10 % please note that the RBM training is a probabilistic process, and | |
11 % thus the papers' results can only be reproduced approximately with | |
12 % large numbers iterations of this script, and selection of RBMs according to | |
13 % their training set performance. | |
14 % --- | |
15 | |
16 % this version reproduces the figure approximately using precomputed RBM | |
17 [test(1), train(1)] = rbm_fig3('rbm_h30'); | |
18 [test(2), train(2)] = rbm_fig3('rbm_h50'); | |
19 [test(3), train(3)] = rbm_fig3('rbm_h100'); | |
20 [test(4), train(4)] = rbm_fig3('rbm_h500'); | |
21 [test(5), train(5)] = rbm_fig3('rbm_h1000'); | |
22 | |
23 % optionally, in order to test new RBMs, use the code below | |
24 % [test(1), train(1)] = rbm_fig3(30); | |
25 % [test(2), train(2)] = rbm_fig3(50); | |
26 % [test(3), train(3)] = rbm_fig3(100); | |
27 % [test(4), train(4)] = rbm_fig3(500); | |
28 % [test(5), train(5)] = rbm_fig3(1000); | |
29 | |
30 hidNum = [30 50 100 500 1000]; | |
31 hFig = figure; | |
32 set(hFig,'Units','centimeters'); | |
33 set(hFig, 'Position', [10 10 10 6]); | |
34 plot(hidNum,train*100,'--rx'); | |
35 hold on | |
36 plot(hidNum,test*100,'-bo'); | |
37 lg = legend('Training','Test'); | |
38 set(lg,'Location','SouthEast'); | |
39 title ('Figure 4: GRADIENT results for different hidNum'); |