Changeset 46 for liacs/nc/low-correlation/mcs-call.m
- Timestamp:
- Dec 18, 2009, 1:43:33 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
liacs/nc/low-correlation/mcs-call.m
r43 r46 7 7 % best_20 = [-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1]; 8 8 9 % Basic variables10 iterations = [1:10:200];11 repetitions = 20;12 length = 20;9 %% Basic variables 10 iterations = 1000; 11 length = 222; 12 repetitions = 1; 13 13 14 14 % Plot the stuff 15 fitnesses = []; 16 for iteration = iterations 17 fitness = []; 18 for rep = 1:repetitions 19 fprintf('Iter:%i, Rep:%i\n',iteration,rep); 20 [new_fitness, value] = mcs(length,iteration); 21 fitness = [fitness, new_fitness]; 15 [iteration_history, fitness_history] = mcs(length,iterations); 22 16 23 % Little hack to display output nicely 24 % disp(rot90(value,-1)); 25 end 26 fitnesses = [fitnesses,mean(fitness)]; 27 end 28 29 plot(iterations,fitnesses); 17 plot(iteration_history,fitness_history); 30 18 title(sprintf('Monte-Carlo Search on Low-Corretation set - repetitions %i',repetitions)); 31 19 ylabel('fitness'); … … 33 21 grid on; 34 22 legend(sprintf('Length %i',length)); 35 print('mcs-fitness.eps','-depsc2'); 23 print(sprintf('mcs-fitness-%f.eps',max(fitness_history)),'-depsc2'); 24 max(fitness_history) 36 25
Note:
See TracChangeset
for help on using the changeset viewer.