forked from agonopol/condense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOptions.m
72 lines (70 loc) · 2.58 KB
/
Options.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
classdef Options
properties
destination = 'results/contract'
fastStop = false;
verbosityLevel = 1;
indentationLevel = 0;
numPrincipalComponents = 50;
numDiffusionSteps = 1;
maxNumContractionSteps = 200;
kKNN = 20;
initialSigma = Inf;
nystroemN = 200;
plotAnimation = true;
inertia = 0.5;
expertLabels = [];
expId = '';
emitRuntimeBreakdown = false;
maxClusters = 30;
emitCondensationSequence = false;
mergeEpsilonClusters = true;
thresholdControlSigma = 0.5;
clusterAssignmentMethod;
controlSigmaMethod;
frequencyMergingEpsilonClusters;
modeCalcDistances = 'normal';
epsilonClusterIdentificationMethod = 'dynamicSigmaFraction';
prefixFileNames = '';
phateEmbedding = false;
labelfn = @(clusters, labels) labels;
sizefn = @(clusters, labels) ones(length(labels), 1);
plotfn = @plotstate;
end
methods
function obj = Options(varargin)
mode = 'classic';
for i=1:length(varargin)-1
if (strcmp(varargin{i}, 'mode'))
mode = varargin{i+1};
end
end
switch (mode)
case 'classic'
obj.clusterAssignmentMethod = 'none';
obj.controlSigmaMethod = 'nuclearNormStabilization';
obj.frequencyMergingEpsilonClusters = 'uponMetastability';
case 'fast'
obj.clusterAssignmentMethod = 'none';
obj.controlSigmaMethod = 'movementStabilization';
obj.frequencyMergingEpsilonClusters = 'always';
end
end
function str = asString(obj)
str = [obj.destination ...
'/' ...
num2str(obj.numPrincipalComponents) '_' ...
num2str(obj.numDiffusionSteps) '_' ...
num2str(obj.kKNN) '_' ...
num2str(obj.initialSigma) '_' ...
num2str(obj.nystroemN) '_' ...
num2str(obj.inertia) '_' ...
num2str(obj.mergeEpsilonClusters) '_' ...
obj.clusterAssignmentMethod '_' ...
obj.controlSigmaMethod '_' ...
obj.frequencyMergingEpsilonClusters '_' ...
obj.epsilonClusterIdentificationMethod '_' ...
obj.modeCalcDistances ...
];
end
end
end