Commit 0979234
authored
Feat/cross validation (#121)
* define interface
* basic ho iterator
* move obtaining data for train from node optimizer to modules themselves
* stage progress
* implement cv iterator
* minor bug fix
* implement cv iterator for decision node
* move cv iteration to base module definition
* implement cv iterator for embedding node
* add training to `score_ho` of each node
* properly define base module
* fix codestyle
* remove regexp node
* remove regexp validator
* fix typing problems (except `DataHandler._split_cv`)
* add ingore oos decorator
* fix codestyle
* fix typing
* add oos handling to cv iterator
* remove `DataHandler.dump()`
* minor bug fix
* implement splitting to cv folds
* fix codestyle
* remove regex tests
* bug fix
* bug fix
* update tests
* fix typing
* big fix
* basic test on cv folding
* add tests for metrics to ignore oos samples
* add tests for cv iterator
* fix codestyle
* minor bug fix
* fix codestyle
* add test for cv
* bug fix
* implement cv iterator for description scorer
* refactor cv iterator for description node
* fix typing
* add cache cleaning before refitting
* bug fix
* implement refitting the whole pipeline with all train data
* fix typing
* bug fix
* fix typing
* respond to samoed
* create `ValidationType` in `autointent.custom_types`
* fix docstring
* properly expose `n_folds` argument
* `ValidationType` -> `ValidationScheme`
* `make schema`1 parent 6a478cd commit 0979234
File tree
42 files changed
+545
-629
lines changed- autointent
- _pipeline
- configs
- context
- data_handler
- optimization_info
- generation/utterances
- metrics
- modules
- abc
- embedding
- regexp
- scoring
- _description
- _dnnc
- _knn
- _mlknn
- _sklearn
- nodes
- _nodes_info
- _optimization
- docs
- tests
- configs
- data
- generation/utterances
- metrics
- modules
- nodes
- pipeline
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+545
-629
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | | - | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
220 | 225 | | |
221 | 226 | | |
222 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
223 | 249 | | |
224 | 250 | | |
225 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | | - | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
48 | 61 | | |
49 | 62 | | |
50 | 63 | | |
| |||
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
100 | 116 | | |
101 | 117 | | |
102 | 118 | | |
| |||
153 | 169 | | |
154 | 170 | | |
155 | 171 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
159 | 176 | | |
160 | | - | |
161 | | - | |
162 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
163 | 183 | | |
164 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
165 | 190 | | |
166 | 191 | | |
167 | 192 | | |
168 | | - | |
| 193 | + | |
169 | 194 | | |
170 | 195 | | |
171 | 196 | | |
172 | | - | |
| 197 | + | |
173 | 198 | | |
174 | 199 | | |
175 | | - | |
| 200 | + | |
176 | 201 | | |
177 | | - | |
| 202 | + | |
178 | 203 | | |
179 | 204 | | |
180 | 205 | | |
| |||
185 | 210 | | |
186 | 211 | | |
187 | 212 | | |
188 | | - | |
| 213 | + | |
189 | 214 | | |
190 | 215 | | |
191 | 216 | | |
| |||
195 | 220 | | |
196 | 221 | | |
197 | 222 | | |
198 | | - | |
| 223 | + | |
199 | 224 | | |
200 | 225 | | |
201 | 226 | | |
202 | 227 | | |
203 | | - | |
| 228 | + | |
204 | 229 | | |
205 | 230 | | |
206 | 231 | | |
| |||
210 | 235 | | |
211 | 236 | | |
212 | 237 | | |
213 | | - | |
| 238 | + | |
214 | 239 | | |
215 | 240 | | |
216 | 241 | | |
217 | 242 | | |
218 | | - | |
| 243 | + | |
219 | 244 | | |
220 | 245 | | |
221 | 246 | | |
222 | 247 | | |
223 | | - | |
| 248 | + | |
224 | 249 | | |
225 | 250 | | |
226 | 251 | | |
227 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
228 | 275 | | |
229 | 276 | | |
230 | 277 | | |
231 | 278 | | |
232 | 279 | | |
233 | | - | |
| 280 | + | |
234 | 281 | | |
235 | 282 | | |
236 | 283 | | |
| |||
239 | 286 | | |
240 | 287 | | |
241 | 288 | | |
242 | | - | |
| 289 | + | |
243 | 290 | | |
244 | 291 | | |
245 | 292 | | |
246 | | - | |
| 293 | + | |
247 | 294 | | |
248 | 295 | | |
249 | 296 | | |
250 | 297 | | |
251 | 298 | | |
252 | | - | |
| 299 | + | |
253 | 300 | | |
254 | 301 | | |
255 | 302 | | |
256 | 303 | | |
257 | 304 | | |
258 | | - | |
| 305 | + | |
259 | 306 | | |
260 | 307 | | |
261 | 308 | | |
262 | 309 | | |
263 | 310 | | |
264 | 311 | | |
265 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
0 commit comments