-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathconstants.py
32 lines (27 loc) · 950 Bytes
/
constants.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
# -*- encoding: utf-8 -*-
BINARY_CLASSIFICATION = 1
MULTICLASS_CLASSIFICATION = 2
MULTILABEL_CLASSIFICATION = 3
REGRESSION = 4
MULTIOUTPUT_REGRESSION = 5
REGRESSION_TASKS = [REGRESSION, MULTIOUTPUT_REGRESSION]
CLASSIFICATION_TASKS = [
BINARY_CLASSIFICATION,
MULTICLASS_CLASSIFICATION,
MULTILABEL_CLASSIFICATION,
]
TASK_TYPES = REGRESSION_TASKS + CLASSIFICATION_TASKS
TASK_TYPES_TO_STRING = {
BINARY_CLASSIFICATION: "binary.classification",
MULTICLASS_CLASSIFICATION: "multiclass.classification",
MULTILABEL_CLASSIFICATION: "multilabel.classification",
REGRESSION: "regression",
MULTIOUTPUT_REGRESSION: "multioutput.regression",
}
STRING_TO_TASK_TYPES = {
"binary.classification": BINARY_CLASSIFICATION,
"multiclass.classification": MULTICLASS_CLASSIFICATION,
"multilabel.classification": MULTILABEL_CLASSIFICATION,
"regression": REGRESSION,
"multioutput.regression": MULTIOUTPUT_REGRESSION,
}