/
intents_snips_sklearn.json
168 lines (168 loc) · 3.82 KB
/
intents_snips_sklearn.json
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{
"dataset_reader": {
"class_name": "snips_reader",
"x": "text",
"y": "intents",
"data_path": "{DOWNLOADS_PATH}/snips"
},
"dataset_iterator": {
"class_name": "snips_intents_iterator",
"seed": 42
},
"chainer": {
"in": [
"x"
],
"in_y": [
"y"
],
"pipe": [
{
"id": "classes_vocab",
"class_name": "simple_vocab",
"fit_on": [
"y"
],
"save_path": "{MODEL_PATH}/classes.dict",
"load_path": "{MODEL_PATH}/classes.dict",
"in": "y",
"out": "y_ids"
},
{
"in": [
"x"
],
"out": [
"x_vec"
],
"fit_on": [
"x",
"y_ids"
],
"id": "tfidf_vec",
"class_name": "sklearn_component",
"save_path": "{MODEL_PATH}/tfidf.pkl",
"load_path": "{MODEL_PATH}/tfidf.pkl",
"model_class": "sklearn.feature_extraction.text:TfidfVectorizer",
"infer_method": "transform",
"lowercase": true,
"analyzer": "word",
"ngram_range": [
1,
5
],
"max_features": 10000,
"norm": null
},
{
"in": [
"x_vec"
],
"out": [
"x_sel"
],
"fit_on": [
"x_vec",
"y_ids"
],
"id": "selector",
"class_name": "sklearn_component",
"save_path": "{MODEL_PATH}/selectkbest.pkl",
"load_path": "{MODEL_PATH}/selectkbest.pkl",
"model_class": "sklearn.feature_selection:SelectKBest",
"infer_method": "transform",
"score_func": "sklearn.feature_selection:chi2",
"k": 1000
},
{
"in": [
"x_sel"
],
"out": [
"x_pca"
],
"fit_on": [
"x_sel"
],
"id": "pca",
"class_name": "sklearn_component",
"save_path": "{MODEL_PATH}/pca.pkl",
"load_path": "{MODEL_PATH}/pca.pkl",
"model_class": "sklearn.decomposition:PCA",
"infer_method": "transform",
"n_components": 300
},
{
"class_name": "one_hotter",
"id": "onehotter",
"depth": "#classes_vocab.len",
"in": "y_ids",
"out": "y_onehot",
"single_vector": true
},
{
"in": [
"x_pca"
],
"out": [
"y_pred_onehot"
],
"fit_on": [
"x_pca",
"y_onehot"
],
"class_name": "sklearn_component",
"main": true,
"save_path": "{MODEL_PATH}/model.pkl",
"load_path": "{MODEL_PATH}/model.pkl",
"model_class": "sklearn.neighbors:KNeighborsClassifier",
"infer_method": "predict",
"ensure_list_output": true
},
{
"class_name": "proba2labels",
"in": "y_pred_onehot",
"out": "y_pred_ids",
"max_proba": true
},
{
"ref": "classes_vocab",
"in": "y_pred_ids",
"out": "y_pred_labels"
}
],
"out": [
"y_pred_labels"
]
},
"train": {
"batch_size": 64,
"metrics": [
"accuracy"
],
"show_examples": false,
"evaluation_targets": [
"train",
"valid"
],
"class_name": "fit_trainer"
},
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"MODEL_PATH": "{MODELS_PATH}/classifiers/intents_snips_sklearn_v11"
},
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/tf.txt",
"{DEEPPAVLOV_PATH}/requirements/fasttext.txt"
],
"download": [
{
"url": "http://files.deeppavlov.ai/deeppavlov_data/classifiers/intents_snips_sklearn_v11.tar.gz",
"subdir": "{MODELS_PATH}/classifiers"
}
]
}
}