-
Notifications
You must be signed in to change notification settings - Fork 2
/
GetExperimentSchemes.m
48 lines (44 loc) · 2.22 KB
/
GetExperimentSchemes.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
function ExperimentSchemes = GetExperimentSchemes(DataArr, Params)
% Function fill Schemes for each dataset in DataArr
% Input:
% DataArr - cell-array with the following format of structs in each cell:
% * name - name of dataset (string)
% * X - [object x feature] matrix (double)
% * truth - cluster label vector (double)
% Params - structure of parameters
%
% Output:
% ExperimentSchemes
% * .SourceFunc - Ensemble source function (cell-array of strings or
% handles)
% * .SourceFuncParams - Ensemble source functino params (cell-array of structs)
% * .EnsembleSize - Number of partitions, generated by each ensemble source function (double array)
% * .ExperimentsNum - Number of experements over a dataset (one experiment = generation of .EnsembleNum partitions with SourceFunc
numData = length(DataArr);
ExperimentSchemes = cell(numData,1);
if(isfield(Params, 'FillOption'))
switch(Params.FillOption)
case 'equal' % Option to fill ''similar'' parameters
for d = 1:numData
ExperimentSchemes{d}.SourceFunc = Params.SrcFuncs{1};
ExperimentSchemes{d}.SourceFuncParams = Params.SrcFuncsParams{1};
ExperimentSchemes{d}.EnsembleSize = Params.EnsembleSize{1};
ExperimentSchemes{d}.ExperimentsNum = Params.ExperimentsNum(1);
ExperimentSchemes{d}.AriLowerThreshold = Params.AriLowerThreshold(1);
ExperimentSchemes{d}.AriUpperThreshold = Params.AriUpperThreshold(1);
end
case 'unique'
for d = 1:numData
ExperimentSchemes{d}.SourceFunc = Params.SrcFuncs{d};
ExperimentSchemes{d}.SourceFuncParams = Params.SrcFuncsParams{d};
ExperimentSchemes{d}.EnsembleSize = Params.EnsembleSize{d};
ExperimentSchemes{d}.ExperimentsNum = Params.ExperimentsNum(d);
ExperimentSchemes{d}.AriLowerThreshold = Params.AriLowerThreshold(d);
ExperimentSchemes{d}.AriUpperThreshold = Params.AriUpperThreshold(d);
end
case 'spec' % Specific option
% ToDo..
case 'handmade' % Handmade option
% Type here, if you wish....
end
end