-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetting.py
80 lines (73 loc) · 1.71 KB
/
setting.py
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
from models import *
# Generic setting
ORIGIN_BASE_PATH = ['..', 'origin_data']
ARFF_BASE_PATH = ['..', 'data']
REPORT_PATH = ['..', 'report']
OUTPUT_PREFIX = None
DATASET = ['NASA', 'PROMISE']
MODELS = [*m, *m_cc]
ARFF_TYPE_MAP = {'int64': 'NUMERIC', 'float64': 'NUMERIC', 'object': 'STRING'}
# Parallel setting
PARALLEL_BACKEND = 'threading'
## -1 use all thread
PARALLEL_NUMBER_THREAD = {
'AEEEM': -1,
'NASA': -1,
'PROMISE': -1
}
# For AEEEM
AEEEM_PROJECT = ['eclipse', 'equinox', 'lucene', 'mylyn', 'pde']
AEEEM_FILE = ['bug-metrics.csv', 'change-metrics.csv', 'complexity-code-change.csv', 'single-version-ck-oo.csv']
## 5 type: ['churn.csv', 'exp-churn.csv', 'lin-churn.csv', 'log-churn.csv', 'weighted-churn.csv']
AEEEM_CHURN_FILE = ['weighted-churn.csv']
## 5 type: ['ent.csv', 'exp-ent.csv', 'lin-ent.csv', 'log-ent.csv', 'weighted-ent.csv']
AEEEM_ENTROPY_FILE = ['lin-ent.csv']
# For NASA
NASA_SUBPATH = ['figshare', 'D\'\'']
NASA_METRIC = [
'BRANCH_COUNT',
'LOC_CODE_AND_COMMENT',
'LOC_COMMENTS',
'CYCLOMATIC_COMPLEXITY',
'DESIGN_COMPLEXITY',
'ESSENTIAL_COMPLEXITY',
'LOC_EXECUTABLE',
'HALSTEAD_CONTENT',
'HALSTEAD_DIFFICULTY',
'HALSTEAD_EFFORT',
'HALSTEAD_ERROR_EST',
'HALSTEAD_LENGTH',
'HALSTEAD_LEVEL',
'HALSTEAD_PROG_TIME',
'HALSTEAD_VOLUME',
'NUM_OPERANDS',
'NUM_OPERATORS',
'NUM_UNIQUE_OPERANDS',
'NUM_UNIQUE_OPERATORS',
'LOC_TOTAL'
]
# For PROMISE
PROMISE_SUBPATH = ['zenodo']
PROMISE_METRIC = [
'wmc',
'dit',
'noc',
'cbo',
'rfc',
'lcom',
'ca',
'npm',
'lcom3',
'loc',
'dam',
'moa',
'mfa',
'cam',
'ic',
'cbm',
'amc',
'max_cc',
'avg_cc',
'ce',
'bug'
]