wolffd@0: % --- wolffd@0: % This script trains similarity measures and evaluates the wolffd@0: % impact of the number of hidden states as displayed in figure 3 of wolffd@0: % % Feature Preprocessing with RBMs for Music Similarity Learning wolffd@0: % Son N. Tran, Daniel Wolff, Tillman Weyde, Artur Garcez, AES53rd wolffd@0: % conference wolffd@0: % wolffd@0: % The output is printed in the console and plotted afterwards wolffd@0: % wolffd@0: % please note that the RBM training is a probabilistic process, and wolffd@0: % thus the papers' results can only be reproduced approximately with wolffd@0: % large numbers iterations of this script, and selection of RBMs according to wolffd@0: % their training set performance. wolffd@0: % --- wolffd@0: wolffd@0: % this version reproduces the figure approximately using precomputed RBM wolffd@0: [test(1), train(1)] = rbm_fig3('rbm_h30'); wolffd@0: [test(2), train(2)] = rbm_fig3('rbm_h50'); wolffd@0: [test(3), train(3)] = rbm_fig3('rbm_h100'); wolffd@0: [test(4), train(4)] = rbm_fig3('rbm_h500'); wolffd@0: [test(5), train(5)] = rbm_fig3('rbm_h1000'); wolffd@0: wolffd@0: % optionally, in order to test new RBMs, use the code below wolffd@0: % [test(1), train(1)] = rbm_fig3(30); wolffd@0: % [test(2), train(2)] = rbm_fig3(50); wolffd@0: % [test(3), train(3)] = rbm_fig3(100); wolffd@0: % [test(4), train(4)] = rbm_fig3(500); wolffd@0: % [test(5), train(5)] = rbm_fig3(1000); wolffd@0: wolffd@0: hidNum = [30 50 100 500 1000]; wolffd@0: hFig = figure; wolffd@0: set(hFig,'Units','centimeters'); wolffd@0: set(hFig, 'Position', [10 10 10 6]); wolffd@0: plot(hidNum,train*100,'--rx'); wolffd@0: hold on wolffd@0: plot(hidNum,test*100,'-bo'); wolffd@0: lg = legend('Training','Test'); wolffd@0: set(lg,'Location','SouthEast'); wolffd@0: title ('Figure 4: GRADIENT results for different hidNum');