-
Notifications
You must be signed in to change notification settings - Fork 0
/
masterExperimenter.m
51 lines (49 loc) · 2.15 KB
/
masterExperimenter.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% COPYRIGHT
% This file is part of TSSA: https://github.com/ayrna/tssa
% Original authors: Antonio M. Duran Rosal, Pedro A. Gutierrez
% Citation: If you use this code, please cite the associated paper [1]
% Copyright:
% This software is released under the The GNU General Public License v3.0 licence
% available at http://www.gnu.org/licenses/gpl-3.0.html
%
% References:
% [1] A.M. Durán-Rosal, P.A. Gutiérrez, S. Salcedo-Sanz and C. Hervás-Martínez.
% "A statistically-driven Coral Reef Optimization algorithm for optimal
% size reduction of time series", Applied Soft Computing,
% Vol. 63. 2018, pp. 139-153.
% https://doi.org/10.1016/j.asoc.2017.11.037
%
% MASTER EXPERIMENTER
% This script runs the ATSS algorithm given an experimental design
% Results are saved in reports/ folder
% You should fill the files array with your time series
files ={'MALLAT_.txt','Donoho-Johnstone.txt'};
warning('off')
nOfruns = 30;
for file = 1:numel(files),
for percentage=4:4,
input = ['..' filesep '..' filesep 'time_series' filesep char(files(file))];
serie = load(input);
c = clock;
folder = ['reports' filesep num2str(c(1)) '-' num2str(c(2)) '-' num2str(c(3)) '-' num2str(c(4)) '-' num2str(c(5)) '-' num2str(uint8(c(6)))];
mkdir('.',folder)
for i=1:nOfruns,
alg(i) = ATSS;
alg(i).dataFile = char(files(file));
alg(i).parameters.numIt = 100;
alg(i).parameters.nPobl = 200;
alg(i).parameters.numSeg = round(0.025*numel(serie(:,2)));
alg(i).parameters.pCross = 0.8;
alg(i).parameters.pMut = 0.2;
alg(i).parameters.seed = i*10;
alg(i).parameters.polyDegree = 0;
alg(i).parameters.percentage_hybridation=0.20+percentage*0.05;
alg(i).parameters.typeError = 2;
information(i) = alg(i).runAlgorithm(serie(:,2));
mkdir('.',[folder filesep num2str(i)])
alg(i).saveAll(information(i),char(files(file)),[folder filesep num2str(i)]);
end
masterSaveAll(folder,information)
clear information;
end
end