-
Notifications
You must be signed in to change notification settings - Fork 0
/
masterExperimenter.m
52 lines (50 loc) · 2.19 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
52
% 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, Á. Carmona-Poyato and C. Hervás-Martínez.
% "A hybrid dynamic exploitation barebones particle swarm optimisation
% algorithm for time series segmentation", Neurocomputing,
% Vol. 353, August, 2019, pp. 45-55.
% https://doi.org/10.1016/j.neucom.2018.05.129
%
% MASTER EXPERIMENTER
% This script runs the PSOTSS 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) = PSOTSS;
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.C1 = 1.49;
alg(i).parameters.C2 = 1.49;
alg(i).parameters.W = 0.72;
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