File: config.py

package info (click to toggle)
shogun 0.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 8,688 kB
  • ctags: 6,563
  • sloc: cpp: 61,677; python: 5,233; sh: 2,767; makefile: 555; objc: 37
file content (154 lines) | stat: -rw-r--r-- 6,393 bytes parent folder | download
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
"""Global configuration parameters: lists and categories"""

# name: accuracy, classifier type, label type
CLASSIFIER={
	'SVMLight':[1e-6, 'kernel', 'twoclass'],
	'LDA':[1e-6, 'lda', 'twoclass'],
	'LibLinear':[1e-7, 'linear', 'twoclass'],
	'LibSVM':[1e-3, 'kernel', 'twoclass'],
	'LibSVMMultiClass':[1e-4, 'kernel', 'series'],
	'LibSVMOneClass':[1e-4, 'kernel', None],
	'GMNPSVM':[1e-8, 'kernel', 'series'],
	'GPBTSVM':[1e-4, 'kernel', 'twoclass'],
	'KNN':[1e-8, 'knn', 'twoclass'],
	'MPDSVM':[1e-6, 'kernel', 'twoclass'],
	'Perceptron':[1e-6, 'perceptron', 'twoclass'],
	'SubGradientSVM':[1e-6, 'linear', 'twoclass'],
	'SVMLin':[1e-7, 'linear', 'twoclass'],
	'SVMOcas':[1e-4, 'linear', 'twoclass'],
	'SVMSGD':[1e-6, 'linear', 'twoclass'],
}

# name: accuracy
CLUSTERING={
	'Hierarchical':[1e-8],
	'KMeans':[1e-8],
}

# name: data_class + _type, feature_class + _type(s), available distance
#  parameters, accuracy
DISTANCE={
	'CanberraMetric':[['rand', 'double'], ['simple', 'Real'], [], 1e-8],
	'ChebyshewMetric':[['rand', 'double'], ['simple', 'Real'], [], 1e-8],
	'CanberraWordDistance':[['dna', ''], ['string_complex', 'Word', 'Char'],
		[], 1e-7],
	'EuclidianDistance':[['rand', 'double'], ['simple', 'Real'], [], 1e-8],
	'GeodesicMetric':[['rand', 'double'], ['simple', 'Real'], [], 1e-8],
	'HammingWordDistance':[['dna', ''], ['string_complex', 'Word', 'Char'],
		['use_sign'], 0],
	'JensenMetric':[['rand', 'double'], ['simple', 'Real'], [], 1e-8],
	'ManhattanMetric':[['rand', 'double'], ['simple', 'Real'], [], 1e-8],
	'ManhattanWordDistance':[['dna', ''], ['string_complex', 'Word', 'Char'],
		[], 0],
	'MinkowskiMetric':[['rand', 'double'], ['simple', 'Real'], ['k'], 1e-8],
	'SparseEuclidianDistance':[['rand', 'double'], ['simple', 'Real'],
		[], 1e-7],
}

# name: data_class + _type, feature_class + _type(s), accuracy
DISTRIBUTION={
	'Histogram':[['dna', ''], ['string_complex', 'Word', 'Char'], 1e-8],
	'LinearHMM':[['dna', ''], ['string_complex', 'Word', 'Char'], 1e-8],
	'HMM':[['cube', ''], ['string_complex', 'Word', 'Char'], 1e-6],
}

# name: data_class + _type, feature_class + _type(s), available kernel
#  parameters, accuracy
KERNEL={
	'AUC':[['rand', 'ushort'], ['simple', 'Word'], ['subkernel'], 1e-8],
	'Byte':[['rand', 'ubyte'], ['simple', 'Byte'], [], 1e-8],
	'Char':[['rand', 'character'], ['simple', 'Char'], [], 1e-8],
	'Chi2':[['rand', 'double'], ['simple', 'Real'], ['width', 'size'], 1e-8],
	'Combined':[['', ''], ['', ''], ['append_subkernel_weights'], 1e-8],
	'CommUlongString':[['dna', ''], ['string_complex', 'Ulong', 'Char'],
		['use_sign', 'normalization'], 1e-9],
	'CommWordString':[['dna', ''], ['string_complex', 'Word', 'Char'],
		['use_sign', 'normalization'], 1e-9],
	'Const':[['rand', 'double'], ['simple', 'Real'], ['c'], 0],
	'Custom':[['rand', 'double'], ['custom', ''], [], 1e-6],
	'Diag':[['rand', 'double'], ['simple', 'Real'], ['diag'], 0],
	'Distance':[['rand', 'double'], ['simple', 'Real'],
		['width', 'distance'], 1e-9],
	'FixedDegreeString':[['dna', ''], ['string', 'Char'], ['degree'], 1e-9],
	'Gaussian':[['rand', 'double'], ['simple', 'Real'], ['width'], 1e-6],
	'GaussianShift':[['rand', 'double'], ['simple', 'Real'],
		['width', 'max_shift', 'shift_step'], 1e-8],
	'HistogramWord':[['dna', ''], ['string_complex', 'Word', 'Char'],
		[], 1e-6],
	'Int':[['rand', 'int'], ['simple', 'Int'], [], 1e-8],
	'Linear':[['rand', 'double'], ['simple', 'Real'], ['scale'], 1e-8],
	'LinearByte':[['rand', 'ubyte'], ['simple', 'Byte'],
		['do_rescale', 'scale'], 1e-8],
	'LinearString':[['dna', ''], ['string', 'Char'], ['scale'], 1e-8],
	'LinearWord':[['rand', 'ushort'], ['simple', 'Word'],
		['do_rescale', 'scale'], 1e-8],
	'LocalAlignmentString':[['dna', ''], ['string', 'Char'], [], 1e-8],
	'LocalityImprovedString':[['dna', ''], ['string', 'Char'],
		['length', 'inner_degree', 'outer_degree'], 1e-8],
	'MindyGram':[['', ''], ['mindy', ''], ['measure', 'width'], 1e-8],
	'Poly':[['rand', 'double'], ['simple', 'Real'],
		['degree', 'inhomogene', 'use_normalization'], 1e-6],
	'PolyMatchString':[['dna', ''], ['string', 'Char'],
		['degree', 'inhomogene'], 1e-10],
	'PolyMatchWord':[['rand', 'ushort'], ['simple', 'Word'],
		['degree', 'inhomogene'], 1e-10],
	'Real':[['rand', 'double'], ['simple', 'Real'], [], 1e-8],
	'SalzbergWord':[['dna', ''], ['string_complex', 'Word', 'Char'],
		[], 1e-6],
	'Short':[['rand', 'ushort'], ['simple', 'short'], [], 1e-8],
	'Sigmoid':[['rand', 'double'], ['simple', 'Real'],
		['size', 'gamma_', 'coef0'], 1e-9],
	'SimpleLocalityImprovedString':[['dna', ''], ['string', 'Char'],
		['length', 'inner_degree', 'outer_degree'], 1e-15],
	'SparseReal':[['rand', 'double'], ['simple', 'Real'], [], 1e-8],
	'SparseGaussian':[['rand', 'double'], ['simple', 'Real'],
		['width'], 1e-8],
	'SparseLinear':[['rand', 'double'], ['simple', 'Real'],
		['scale'], 1e-8],
	'SparsePoly':[['rand', 'double'], ['simple', 'Real'],
		['size', 'degree', 'inhomogene', 'use_normalization'], 1e-8],
	'SparseWord':[['rand', 'double'], ['simple', 'Word'], [], 1e-8],
	'StringCharKernel':[['dna', ''], ['string', 'Char'], [], 1e-8],
	'StringIntKernel':[['dna', ''], ['string', 'Int'], [], 1e-8],
	'StringRealKernel':[['dna', ''], ['string', 'Real'], [], 1e-8],
	'StringUlongKernel':[['dna', ''], ['string', 'Ulong'], [], 1e-8],
	'StringWordKernel':[['dna', ''], ['string', 'Word'], [], 1e-8],
	'Ulong':[['rand', 'double'], ['simple', 'Ulong'], [], 1e-8],
	'WeightedDegreePositionString':[['dna', ''], ['string', 'Char'],
		['degree', 'weights', 'shift', 'shift_len', 'max_mismatch',
		'use_normalization', 'mkl_stepsize'], 1e-8],
	'WeightedDegreeString':[['dna', ''], ['string', 'Char'], ['degree'], 1e-9],
	'WeightedCommWordString':[['dna', ''], ['string_complex', 'Word', 'Char'],
		['use_sign', 'normalization'], 1e-9],
	'Word':[['rand', 'ushort'], ['simple', 'Word'], [], 1e-8],
	'WordMatch':[['rand', 'ushort'], ['simple', 'Word'],
		['degree', 'do_rescale', 'scale'], 1e-8],
}

# name: accuracy, classifier type
REGRESSION={
	'SVRLight':[1e-6, 'svm'],
	'LibSVR':[1e-6, 'svm'],
	'KRR':[1e-8, 'kernelmachine'],
}

# name: args
PREPROC={
	'LogPlusOne':[],
	'NormOne':[],
	'PruneVarSubMean':[['divide']],
	'PCACut':[],
	'NormDerivativeLem3':[],
	'SortWord':[],
	'SortWordString':[],
	'SortUlongString':[],
}

# categories
C_KERNEL=0
C_DISTANCE=1
C_CLASSIFIER=2
C_CLUSTERING=3
C_DISTRIBUTION=4
C_REGRESSION=5
C_PREPROC=6