-
Notifications
You must be signed in to change notification settings - Fork 0
/
auto-sklearn简析.html
491 lines (424 loc) · 136 KB
/
auto-sklearn简析.html
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>auto-sklearn简析</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
<body class="stackedit">
<div class="stackedit__left">
<div class="stackedit__toc">
<ul>
<li>
<ul>
<li></li>
</ul>
</li>
<li>
<ul>
<li></li>
</ul>
</li>
<li>
<ul>
<li></li>
</ul>
</li>
<li>
<ul>
<li></li>
</ul>
</li>
<li>
<ul>
<li></li>
</ul>
</li>
<li></li>
</ul>
</div>
</div>
<div class="stackedit__right">
<div class="stackedit__html">
<p></p><div class="toc"><h3>auto-sklearn简析</h3><ul><li><a href="#_autosklearn_3">一. auto-sklearn简介</a></li><ul><ul><li><a href="#0_sklearn_4">0. 什么是sklearn</a></li><li><a href="#1_autosklearn_8">1. 什么是auto-sklearn</a></li><li><a href="#2_autosklearnauto_10">2. auto-sklearn可以auto到什么程度?</a></li><li><a href="#3_autosklearn_14">3. auto-sklearn有什么特点</a></li><li><a href="#4_autosklearn_26">4. 怎么使用auto-sklearn</a></li></ul></ul><li><a href="#__142">二. 主要功能分析与建模</a></li><ul><ul><li><a href="#1__143">1. 从一个简单的示例出发</a></li><li><a href="#2__226">2. 需求建模</a></li><li><a href="#3__262">3. 实际执行流程</a></li></ul></ul><li><a href="#__399">三. 核心流程设计分析</a></li><ul><ul><li><a href="#1__400">1. 类间关系</a></li><li><a href="#2__457">2. 时序图</a></li></ul></ul><li><a href="#__460">四. 高级设计意图分析</a></li><ul><ul><li><a href="#1__461">1. 策略模式</a></li><li><a href="#2__511">2. 代理模式</a></li></ul></ul><li><a href="#__515">五. 结语</a></li></ul></div><br>
这是笔者在中国科学院大学上王伟老师的面向对象程序设计一课时的作业要求——对auto-sklearn进行分析以考察面向对象思想在其中的应用。<br>
因此,本文的重点不是auto-sklearn的介绍与分析,也不是具体源码实现的解析与算法设计的讨论,而是对需求建模、主要功能流程设计、类及类间关系、面向对象设计原则及设计模式的分析。总而言之,是对面向对象思想的探讨。<p></p>
<h1><a id="_autosklearn_3"></a>一. auto-sklearn简介</h1>
<h3><a id="0_sklearn_4"></a>0. 什么是sklearn</h3>
<p> 但凡接触过机器学习的人对sklearn(scikit-learn)一定不陌生,它是基于Python语言的机器学习工具,是机器学习中常用的第三方模块,它对常用的机器学习方法进行了封装,包括回归、降维、分类、聚类等方法。<br>
<img src="https://img-blog.csdnimg.cn/20210129171841156.png" alt="在这里插入图片描述"><br>
sklearn具有广泛的应用,其功能非常强大,但此处不会做过多展开,如果读者希望进一步了解sklearn,这里提供sklearn的中文官网供参考:<a href="https://sklearn.apachecn.org/">Introduction·sklearn</a>。</p>
<h3><a id="1_autosklearn_8"></a>1. 什么是auto-sklearn</h3>
<p> auto-sklearn 提供了开箱即用的监督型自动机器学习。从名字可以看出,auto-sklearn 是基于机器学习库 scikit-learn 构建的,可为新的数据集自动搜索学习算法,并优化其超参数。因此,它将机器学习使用者从繁琐的任务中解放出来,使其有更多时间专注于实际问题。当前版本为 0.6.0,具体信息请查看官网<a href="https://automl.github.io/auto-sklearn/master/">auto-sklearn</a>。</p>
<h3><a id="2_autosklearnauto_10"></a>2. auto-sklearn可以auto到什么程度?</h3>
<p><img src="https://img-blog.csdnimg.cn/20210129175855669.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pKMTAxOFJS,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br>
我们以机器学习的分类模型为例,常规的机器学习框架如图中的灰色部分,导入数据后,在经过数据预处理和特征预处理后,通过分类器输出预测值,如果结果不尽人意,需要手动调整超参数并重新选择合适的模型。<br>
而自动的部分就如图绿框所示,在<strong>ML-framework</strong>左边新增<strong>meta-learning</strong>,在右边新增<strong>build-ensemble</strong>,并使用贝叶斯优化自动调超参数。<strong>meta-learning</strong>是用于初始化贝叶斯优化器的元学习,它可以去学习样本数据的模样,一旦找到相似的数据集,就可以根据经验来推荐好用的分类器,比如文本数据用什么模型比较好,很多离散的数据用什么模型比较好。<strong>build-ensemble</strong>是优化过程中的自动模型集成,可以根据贝叶斯优化找到最佳的分类器组合,往往能提高预测的准确性。</p>
<h3><a id="3_autosklearn_14"></a>3. auto-sklearn有什么特点</h3>
<p>(1)优点</p>
<ul>
<li>支持设置单次训练时间和总体训练时间,使得工具既能限制训练时间,又能充分利用时间和算力</li>
<li>支持切分训练/测试集的方式,也支持使用交叉验证,从而减少了训练模型的代码量和程序的复杂程度</li>
<li>支持加入扩展模型以及扩展预测处理方法,使训练具有多样性和灵活性</li>
</ul>
<p>(2)缺点</p>
<ul>
<li>输出携带的信息较少,想进一步训练只能重写代码</li>
<li>不支持深度学习</li>
<li>适用范围有限,只适用于tabular data上的监督学习,对非数值型的数据不太友好</li>
</ul>
<h3><a id="4_autosklearn_26"></a>4. 怎么使用auto-sklearn</h3>
<p> 对于给定的数据集,我们如何利用auto-sklearn来对它进行自动化的机器学习呢?上手的方法非常简单,设置好以下几种关键的参数即可。<br>
<img src="https://img-blog.csdnimg.cn/20210129181154985.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pKMTAxOFJS,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"></p>
<ul>
<li>训练时间和内存的使用量的设置,其中时间包括所有模型训练时间的总和以及单个模型训练的最长时间,单位是秒;</li>
<li>训练后模型的存储,参数默认为训练完成后删除训练的暂存目录和输出目录,使用以下参数,可指定其暂存目录及是否删除;</li>
<li>数据的切分,使用resampling_strategy参数可设置训练集与测试集的切分方法,这里展示了设置五折交叉验证的方法;</li>
<li>模型的选择,可以通过这个参数支持指定备选的机器学习模型,或者从所有模型中去掉一些机器学习模型。</li>
</ul>
<p>以下是两个简单示例:</p>
<p>(1)回归任务</p>
<pre><code class="prism language-python"><span class="token comment"># -*- encoding: utf-8 -*-</span>
<span class="token triple-quoted-string string">"""
==========
Regression
==========
The following example shows how to fit a simple regression model with
*auto-sklearn*.
"""</span>
<span class="token keyword">import</span> sklearn<span class="token punctuation">.</span>datasets
<span class="token keyword">import</span> sklearn<span class="token punctuation">.</span>metrics
<span class="token keyword">import</span> autosklearn<span class="token punctuation">.</span>regression
<span class="token comment">############################################################################</span>
<span class="token comment"># Data Loading</span>
<span class="token comment"># ============</span>
X<span class="token punctuation">,</span> y <span class="token operator">=</span> sklearn<span class="token punctuation">.</span>datasets<span class="token punctuation">.</span>load_boston<span class="token punctuation">(</span>return_X_y<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">)</span>
X_train<span class="token punctuation">,</span> X_test<span class="token punctuation">,</span> y_train<span class="token punctuation">,</span> y_test <span class="token operator">=</span> \
sklearn<span class="token punctuation">.</span>model_selection<span class="token punctuation">.</span>train_test_split<span class="token punctuation">(</span>X<span class="token punctuation">,</span> y<span class="token punctuation">,</span> random_state<span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">)</span>
<span class="token comment">############################################################################</span>
<span class="token comment"># Build and fit a regressor</span>
<span class="token comment"># =========================</span>
automl <span class="token operator">=</span> autosklearn<span class="token punctuation">.</span>regression<span class="token punctuation">.</span>AutoSklearnRegressor<span class="token punctuation">(</span>
time_left_for_this_task<span class="token operator">=</span><span class="token number">120</span><span class="token punctuation">,</span>
per_run_time_limit<span class="token operator">=</span><span class="token number">30</span><span class="token punctuation">,</span>
tmp_folder<span class="token operator">=</span><span class="token string">'/tmp/autosklearn_regression_example_tmp'</span><span class="token punctuation">,</span>
output_folder<span class="token operator">=</span><span class="token string">'/tmp/autosklearn_regression_example_out'</span><span class="token punctuation">,</span>
<span class="token punctuation">)</span>
automl<span class="token punctuation">.</span>fit<span class="token punctuation">(</span>X_train<span class="token punctuation">,</span> y_train<span class="token punctuation">,</span> dataset_name<span class="token operator">=</span><span class="token string">'boston'</span><span class="token punctuation">)</span>
<span class="token comment">############################################################################</span>
<span class="token comment"># Print the final ensemble constructed by auto-sklearn</span>
<span class="token comment"># ====================================================</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>automl<span class="token punctuation">.</span>show_models<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment">###########################################################################</span>
<span class="token comment"># Get the Score of the final ensemble</span>
<span class="token comment"># ===================================</span>
predictions <span class="token operator">=</span> automl<span class="token punctuation">.</span>predict<span class="token punctuation">(</span>X_test<span class="token punctuation">)</span>
<span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"R2 score:"</span><span class="token punctuation">,</span> sklearn<span class="token punctuation">.</span>metrics<span class="token punctuation">.</span>r2_score<span class="token punctuation">(</span>y_test<span class="token punctuation">,</span> predictions<span class="token punctuation">)</span><span class="token punctuation">)</span>
</code></pre>
<p>(2)分类任务</p>
<pre><code class="prism language-python"><span class="token comment"># -*- encoding: utf-8 -*-</span>
<span class="token triple-quoted-string string">"""
==============
Classification
==============
The following example shows how to fit a simple classification model with
*auto-sklearn*.
"""</span>
<span class="token keyword">import</span> sklearn<span class="token punctuation">.</span>datasets
<span class="token keyword">import</span> sklearn<span class="token punctuation">.</span>metrics
<span class="token keyword">import</span> autosklearn<span class="token punctuation">.</span>classification
<span class="token comment">############################################################################</span>
<span class="token comment"># Data Loading</span>
<span class="token comment"># ============</span>
X<span class="token punctuation">,</span> y <span class="token operator">=</span> sklearn<span class="token punctuation">.</span>datasets<span class="token punctuation">.</span>load_breast_cancer<span class="token punctuation">(</span>return_X_y<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">)</span>
X_train<span class="token punctuation">,</span> X_test<span class="token punctuation">,</span> y_train<span class="token punctuation">,</span> y_test <span class="token operator">=</span> \
sklearn<span class="token punctuation">.</span>model_selection<span class="token punctuation">.</span>train_test_split<span class="token punctuation">(</span>X<span class="token punctuation">,</span> y<span class="token punctuation">,</span> random_state<span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">)</span>
<span class="token comment">############################################################################</span>
<span class="token comment"># Build and fit a regressor</span>
<span class="token comment"># =========================</span>
automl <span class="token operator">=</span> autosklearn<span class="token punctuation">.</span>classification<span class="token punctuation">.</span>AutoSklearnClassifier<span class="token punctuation">(</span>
time_left_for_this_task<span class="token operator">=</span><span class="token number">120</span><span class="token punctuation">,</span>
per_run_time_limit<span class="token operator">=</span><span class="token number">30</span><span class="token punctuation">,</span>
tmp_folder<span class="token operator">=</span><span class="token string">'/tmp/autosklearn_classification_example_tmp'</span><span class="token punctuation">,</span>
output_folder<span class="token operator">=</span><span class="token string">'/tmp/autosklearn_classification_example_out'</span><span class="token punctuation">,</span>
<span class="token punctuation">)</span>
automl<span class="token punctuation">.</span>fit<span class="token punctuation">(</span>X_train<span class="token punctuation">,</span> y_train<span class="token punctuation">,</span> dataset_name<span class="token operator">=</span><span class="token string">'breast_cancer'</span><span class="token punctuation">)</span>
<span class="token comment">############################################################################</span>
<span class="token comment"># Print the final ensemble constructed by auto-sklearn</span>
<span class="token comment"># ====================================================</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>automl<span class="token punctuation">.</span>show_models<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment">###########################################################################</span>
<span class="token comment"># Get the Score of the final ensemble</span>
<span class="token comment"># ===================================</span>
predictions <span class="token operator">=</span> automl<span class="token punctuation">.</span>predict<span class="token punctuation">(</span>X_test<span class="token punctuation">)</span>
<span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"Accuracy score:"</span><span class="token punctuation">,</span> sklearn<span class="token punctuation">.</span>metrics<span class="token punctuation">.</span>accuracy_score<span class="token punctuation">(</span>y_test<span class="token punctuation">,</span> predictions<span class="token punctuation">)</span><span class="token punctuation">)</span>
</code></pre>
<h1><a id="__142"></a>二. 主要功能分析与建模</h1>
<h3><a id="1__143"></a>1. 从一个简单的示例出发</h3>
<p>以下是官网给出一个最简单的多分类示例:</p>
<pre><code class="prism language-python"><span class="token triple-quoted-string string">"""
==========================
Multi-label Classification
==========================
This examples shows how to format the targets for a multilabel classification
problem. Details on multilabel classification can be found
`here <https://scikit-learn.org/stable/modules/multiclass.html>`_.
"""</span>
<span class="token keyword">import</span> numpy <span class="token keyword">as</span> np
<span class="token keyword">import</span> sklearn<span class="token punctuation">.</span>datasets
<span class="token keyword">import</span> sklearn<span class="token punctuation">.</span>metrics
<span class="token keyword">from</span> sklearn<span class="token punctuation">.</span>utils<span class="token punctuation">.</span>multiclass <span class="token keyword">import</span> type_of_target
<span class="token keyword">import</span> autosklearn<span class="token punctuation">.</span>classification
<span class="token comment">############################################################################</span>
<span class="token comment"># Data Loading</span>
<span class="token comment"># ============</span>
<span class="token comment"># Using reuters multilabel dataset -- https://www.openml.org/d/40594</span>
X<span class="token punctuation">,</span> y <span class="token operator">=</span> sklearn<span class="token punctuation">.</span>datasets<span class="token punctuation">.</span>fetch_openml<span class="token punctuation">(</span>data_id<span class="token operator">=</span><span class="token number">40594</span><span class="token punctuation">,</span> return_X_y<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">,</span> as_frame<span class="token operator">=</span><span class="token boolean">False</span><span class="token punctuation">)</span>
<span class="token comment"># fetch openml downloads a numpy array with TRUE/FALSE strings. Re-map it to</span>
<span class="token comment"># integer dtype with ones and zeros</span>
<span class="token comment"># This is to comply with Scikit-learn requirement:</span>
<span class="token comment"># "Positive classes are indicated with 1 and negative classes with 0 or -1."</span>
<span class="token comment"># More information on: https://scikit-learn.org/stable/modules/multiclass.html</span>
y<span class="token punctuation">[</span>y <span class="token operator">==</span> <span class="token string">'TRUE'</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token number">1</span>
y<span class="token punctuation">[</span>y <span class="token operator">==</span> <span class="token string">'FALSE'</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token number">0</span>
y <span class="token operator">=</span> y<span class="token punctuation">.</span>astype<span class="token punctuation">(</span>np<span class="token punctuation">.</span><span class="token builtin">int</span><span class="token punctuation">)</span>
<span class="token comment"># Using type of target is a good way to make sure your data</span>
<span class="token comment"># is properly formatted</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>f<span class="token string">"type_of_target={type_of_target(y)}"</span><span class="token punctuation">)</span>
X_train<span class="token punctuation">,</span> X_test<span class="token punctuation">,</span> y_train<span class="token punctuation">,</span> y_test <span class="token operator">=</span> sklearn<span class="token punctuation">.</span>model_selection<span class="token punctuation">.</span>train_test_split<span class="token punctuation">(</span>
X<span class="token punctuation">,</span> y<span class="token punctuation">,</span> random_state<span class="token operator">=</span><span class="token number">1</span>
<span class="token punctuation">)</span>
<span class="token comment">############################################################################</span>
<span class="token comment"># Building the classifier</span>
<span class="token comment"># =======================</span>
automl <span class="token operator">=</span> autosklearn<span class="token punctuation">.</span>classification<span class="token punctuation">.</span>AutoSklearnClassifier<span class="token punctuation">(</span>
time_left_for_this_task<span class="token operator">=</span><span class="token number">60</span><span class="token punctuation">,</span>
per_run_time_limit<span class="token operator">=</span><span class="token number">30</span><span class="token punctuation">,</span>
<span class="token comment"># Bellow two flags are provided to speed up calculations</span>
<span class="token comment"># Not recommended for a real implementation</span>
initial_configurations_via_metalearning<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">,</span>
smac_scenario_args<span class="token operator">=</span><span class="token punctuation">{</span><span class="token string">'runcount_limit'</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">)</span>
automl<span class="token punctuation">.</span>fit<span class="token punctuation">(</span>X_train<span class="token punctuation">,</span> y_train<span class="token punctuation">,</span> dataset_name<span class="token operator">=</span><span class="token string">'reuters'</span><span class="token punctuation">)</span>
<span class="token comment">############################################################################</span>
<span class="token comment"># Print the final ensemble constructed by auto-sklearn</span>
<span class="token comment"># ====================================================</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>automl<span class="token punctuation">.</span>show_models<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment">############################################################################</span>
<span class="token comment"># Print statistics about the auto-sklearn run</span>
<span class="token comment"># ===========================================</span>
<span class="token comment"># Print statistics about the auto-sklearn run such as number of</span>
<span class="token comment"># iterations, number of models failed with a time out.</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>automl<span class="token punctuation">.</span>sprint_statistics<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment">############################################################################</span>
<span class="token comment"># Get the Score of the final ensemble</span>
<span class="token comment"># ===================================</span>
predictions <span class="token operator">=</span> automl<span class="token punctuation">.</span>predict<span class="token punctuation">(</span>X_test<span class="token punctuation">)</span>
<span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"Accuracy score"</span><span class="token punctuation">,</span> sklearn<span class="token punctuation">.</span>metrics<span class="token punctuation">.</span>accuracy_score<span class="token punctuation">(</span>y_test<span class="token punctuation">,</span> predictions<span class="token punctuation">)</span><span class="token punctuation">)</span>
</code></pre>
<p> 实现过程注释里面给的很清晰,分为了几个部分,数据加载(data loading),创建分类器(build the classifier),得出结果(get the score),而其中的核心过程创建分类器用到的方法基本来自于对象<code>automl</code>,包括<code>automl.fit()</code>,<code>automl.show_models()</code>,<code>automl.sprint_statistics()</code>,<code>automl.predict()</code>,而这个对象在这里被创建为类<code>AutoSklearnClassifier</code>的一个实例。<br>
正如我们一开始就讲到,文章的重点是面向对象思想,而非项目本身。所以我们试图通过选择简单的分析样例来避开项目自身的实现复杂性,避开诸多细节,只接触核心流程。</p>
<h3><a id="2__226"></a>2. 需求建模</h3>
<p> 首先,我们对上述示例进行需求建模:</p>
<blockquote>
<p>【用例名称】<br>
多分类自动化机器学习<br>
【场景】<br>
who:训练集、测试集、分类模型、预测结果<br>
where:内存空间<br>
when:运行时间<br>
【用例描述】</p>
<ol>
<li>载入数据集</li>
<li>进行数据预处理<br>
2.1 若数据集没有划分训练集和测试集,按一定规则划分<br>
2.2 若有归一化需求,则将数据进行归一化</li>
<li>创建合适的分类器</li>
<li>进行训练,自动化调参</li>
<li>打印最终模型及其相关参数</li>
<li>对测试集数据进行分类预测,得到预测结果的正确率</li>
</ol>
</blockquote>
<blockquote>
<p>【用例价值】<br>
完成多分类的机器学习任务<br>
【约束和限制】<br>
输入数据为数值型</p>
</blockquote>
<p> 寻找其中的动词和名词:</p>
<blockquote>
<p>【动词】载入、预处理、划分、归一化、创建、训练、预测、打印模型<br>
【名词】数据集、训练集、测试集、分类器、预测结果</p>
</blockquote>
<p> 数据集(包括训练集和测试集)为一系列数值,没有必要抽象成类,从而我们得到应该抽象出来的类及其方法和属性:</p>
<blockquote>
<p>【类】分类器(AutoSklearnClassifier)<br>
【属性】训练需要的相关信息,包括训练时间,模型存储等<br>
【方法】训练、预测、打印模型</p>
</blockquote>
<p> 而这与之前得到的对象<code>automl</code>的性质正好相对应起来了。</p>
<h3><a id="3__262"></a>3. 实际执行流程</h3>
<p> 1. 完成自动化机器学习任务的最核心过程就是模型的训练过程了,在代码中体现为对<code>automl</code>对象的<code>fit()</code>方法的调用,其具体执行流程如下:<br>
<code>fit()</code>方法是<code>AutoSklearnClassifier</code>这个类下声明的第一个方法:</p>
<pre><code class="prism language-python"><span class="token keyword">class</span> <span class="token class-name">AutoSklearnClassifier</span><span class="token punctuation">(</span>AutoSklearnEstimator<span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token keyword">def</span> <span class="token function">fit</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> X<span class="token punctuation">,</span> y<span class="token punctuation">,</span>
X_test<span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">,</span>
y_test<span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">,</span>
feat_type<span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">,</span>
dataset_name<span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">"""Fit *auto-sklearn* to given training set (X, y).
Fit both optimizes the machine learning models and builds an ensemble
out of them. To disable ensembling, set ``ensemble_size==0``.
"""</span>
<span class="token comment"># Before running anything else, first check that the</span>
<span class="token comment"># type of data is compatible with auto-sklearn. Legal target</span>
<span class="token comment"># types are: binary, multiclass, multilabel-indicator.</span>
target_type <span class="token operator">=</span> type_of_target<span class="token punctuation">(</span>y<span class="token punctuation">)</span>
supported_types <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'binary'</span><span class="token punctuation">,</span> <span class="token string">'multiclass'</span><span class="token punctuation">,</span> <span class="token string">'multilabel-indicator'</span><span class="token punctuation">]</span>
<span class="token keyword">if</span> target_type <span class="token operator">not</span> <span class="token keyword">in</span> supported_types<span class="token punctuation">:</span>
<span class="token keyword">raise</span> ValueError<span class="token punctuation">(</span><span class="token string">"Classification with data of type {} is "</span>
<span class="token string">"not supported. Supported types are {}. "</span>
<span class="token string">"You can find more information about scikit-learn "</span>
<span class="token string">"data types in: "</span>
<span class="token string">"https://scikit-learn.org/stable/modules/multiclass.html"</span>
<span class="token string">""</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>
target_type<span class="token punctuation">,</span>
supported_types
<span class="token punctuation">)</span>
<span class="token punctuation">)</span>
<span class="token comment"># remember target type for using in predict_proba later.</span>
self<span class="token punctuation">.</span>target_type <span class="token operator">=</span> target_type
<span class="token builtin">super</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span>fit<span class="token punctuation">(</span>
X<span class="token operator">=</span>X<span class="token punctuation">,</span>
y<span class="token operator">=</span>y<span class="token punctuation">,</span>
X_test<span class="token operator">=</span>X_test<span class="token punctuation">,</span>
y_test<span class="token operator">=</span>y_test<span class="token punctuation">,</span>
feat_type<span class="token operator">=</span>feat_type<span class="token punctuation">,</span>
dataset_name<span class="token operator">=</span>dataset_name<span class="token punctuation">,</span>
<span class="token punctuation">)</span>
<span class="token keyword">return</span> self
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre>
<p> 2. 在这个方法中,通过调用<code>super().fit()</code>实现函数主体过程,而在python语法中,与java类似的,使用<strong>super</strong>关键字表示调用父类的方法,即此处通过调用父类的<code>fit()</code>方法来实现该类(指<code>AutoSklearnClassifier</code>)的相同方法,相当于该类继承使用其父类的同名方法。<br>
其父类的<code>fit()</code>方法定义如下:</p>
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">fit</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> <span class="token operator">**</span>kwargs<span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token comment"># Handle the number of jobs and the time for them</span>
<span class="token keyword">if</span> self<span class="token punctuation">.</span>n_jobs <span class="token keyword">is</span> <span class="token boolean">None</span> <span class="token operator">or</span> self<span class="token punctuation">.</span>n_jobs <span class="token operator">==</span> <span class="token number">1</span><span class="token punctuation">:</span>
self<span class="token punctuation">.</span>_n_jobs <span class="token operator">=</span> <span class="token number">1</span>
<span class="token keyword">elif</span> self<span class="token punctuation">.</span>n_jobs <span class="token operator">==</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">:</span>
self<span class="token punctuation">.</span>_n_jobs <span class="token operator">=</span> joblib<span class="token punctuation">.</span>cpu_count<span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token keyword">else</span><span class="token punctuation">:</span>
self<span class="token punctuation">.</span>_n_jobs <span class="token operator">=</span> self<span class="token punctuation">.</span>n_jobs
<span class="token comment"># Automatically set the cutoff time per task</span>
<span class="token keyword">if</span> self<span class="token punctuation">.</span>per_run_time_limit <span class="token keyword">is</span> <span class="token boolean">None</span><span class="token punctuation">:</span>
self<span class="token punctuation">.</span>per_run_time_limit <span class="token operator">=</span> self<span class="token punctuation">.</span>_n_jobs <span class="token operator">*</span> self<span class="token punctuation">.</span>time_left_for_this_task <span class="token operator">//</span> <span class="token number">10</span>
seed <span class="token operator">=</span> self<span class="token punctuation">.</span>seed
self<span class="token punctuation">.</span>automl_ <span class="token operator">=</span> self<span class="token punctuation">.</span>build_automl<span class="token punctuation">(</span>
seed<span class="token operator">=</span>seed<span class="token punctuation">,</span>
ensemble_size<span class="token operator">=</span>self<span class="token punctuation">.</span>ensemble_size<span class="token punctuation">,</span>
initial_configurations_via_metalearning<span class="token operator">=</span><span class="token punctuation">(</span>
self<span class="token punctuation">.</span>initial_configurations_via_metalearning
<span class="token punctuation">)</span><span class="token punctuation">,</span>
tmp_folder<span class="token operator">=</span>self<span class="token punctuation">.</span>tmp_folder<span class="token punctuation">,</span>
output_folder<span class="token operator">=</span>self<span class="token punctuation">.</span>output_folder<span class="token punctuation">,</span>
<span class="token punctuation">)</span>
self<span class="token punctuation">.</span>automl_<span class="token punctuation">.</span>fit<span class="token punctuation">(</span>load_models<span class="token operator">=</span>self<span class="token punctuation">.</span>_load_models<span class="token punctuation">,</span> <span class="token operator">**</span>kwargs<span class="token punctuation">)</span>
<span class="token keyword">return</span> self
</code></pre>
<p> 3. 在这个过程中,首先调用了该类(指<code>AutoSklearnClassifier</code>的父类)的<code>build_automl()</code>方法创建了一个自动化机器学习器,该方法代码如下:</p>
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">build_automl</span><span class="token punctuation">(</span>
self<span class="token punctuation">,</span>
seed<span class="token punctuation">:</span> <span class="token builtin">int</span><span class="token punctuation">,</span>
ensemble_size<span class="token punctuation">:</span> <span class="token builtin">int</span><span class="token punctuation">,</span>
initial_configurations_via_metalearning<span class="token punctuation">:</span> <span class="token builtin">int</span><span class="token punctuation">,</span>
tmp_folder<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span>
output_folder<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span>
smac_scenario_args<span class="token punctuation">:</span> Optional<span class="token punctuation">[</span>Dict<span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token boolean">None</span><span class="token punctuation">,</span>
<span class="token punctuation">)</span><span class="token punctuation">:</span>
backend <span class="token operator">=</span> create<span class="token punctuation">(</span>
temporary_directory<span class="token operator">=</span>tmp_folder<span class="token punctuation">,</span>
output_directory<span class="token operator">=</span>output_folder<span class="token punctuation">,</span>
delete_tmp_folder_after_terminate<span class="token operator">=</span>self<span class="token punctuation">.</span>delete_tmp_folder_after_terminate<span class="token punctuation">,</span>
delete_output_folder_after_terminate<span class="token operator">=</span>self<span class="token punctuation">.</span>delete_output_folder_after_terminate<span class="token punctuation">,</span>
<span class="token punctuation">)</span>
<span class="token keyword">if</span> smac_scenario_args <span class="token keyword">is</span> <span class="token boolean">None</span><span class="token punctuation">:</span>
smac_scenario_args <span class="token operator">=</span> self<span class="token punctuation">.</span>smac_scenario_args
automl <span class="token operator">=</span> self<span class="token punctuation">.</span>_get_automl_class<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">(</span>
backend<span class="token operator">=</span>backend<span class="token punctuation">,</span>
time_left_for_this_task<span class="token operator">=</span>self<span class="token punctuation">.</span>time_left_for_this_task<span class="token punctuation">,</span>
per_run_time_limit<span class="token operator">=</span>self<span class="token punctuation">.</span>per_run_time_limit<span class="token punctuation">,</span>
initial_configurations_via_metalearning<span class="token operator">=</span>initial_configurations_via_metalearning<span class="token punctuation">,</span>
ensemble_size<span class="token operator">=</span>ensemble_size<span class="token punctuation">,</span>
ensemble_nbest<span class="token operator">=</span>self<span class="token punctuation">.</span>ensemble_nbest<span class="token punctuation">,</span>
max_models_on_disc<span class="token operator">=</span>self<span class="token punctuation">.</span>max_models_on_disc<span class="token punctuation">,</span>
seed<span class="token operator">=</span>seed<span class="token punctuation">,</span>
memory_limit<span class="token operator">=</span>self<span class="token punctuation">.</span>memory_limit<span class="token punctuation">,</span>
include_estimators<span class="token operator">=</span>self<span class="token punctuation">.</span>include_estimators<span class="token punctuation">,</span>
exclude_estimators<span class="token operator">=</span>self<span class="token punctuation">.</span>exclude_estimators<span class="token punctuation">,</span>
include_preprocessors<span class="token operator">=</span>self<span class="token punctuation">.</span>include_preprocessors<span class="token punctuation">,</span>
exclude_preprocessors<span class="token operator">=</span>self<span class="token punctuation">.</span>exclude_preprocessors<span class="token punctuation">,</span>
resampling_strategy<span class="token operator">=</span>self<span class="token punctuation">.</span>resampling_strategy<span class="token punctuation">,</span>
resampling_strategy_arguments<span class="token operator">=</span>self<span class="token punctuation">.</span>resampling_strategy_arguments<span class="token punctuation">,</span>
n_jobs<span class="token operator">=</span>self<span class="token punctuation">.</span>_n_jobs<span class="token punctuation">,</span>
dask_client<span class="token operator">=</span>self<span class="token punctuation">.</span>dask_client<span class="token punctuation">,</span>
get_smac_object_callback<span class="token operator">=</span>self<span class="token punctuation">.</span>get_smac_object_callback<span class="token punctuation">,</span>
disable_evaluator_output<span class="token operator">=</span>self<span class="token punctuation">.</span>disable_evaluator_output<span class="token punctuation">,</span>
smac_scenario_args<span class="token operator">=</span>smac_scenario_args<span class="token punctuation">,</span>
logging_config<span class="token operator">=</span>self<span class="token punctuation">.</span>logging_config<span class="token punctuation">,</span>
metadata_directory<span class="token operator">=</span>self<span class="token punctuation">.</span>metadata_directory<span class="token punctuation">,</span>
metric<span class="token operator">=</span>self<span class="token punctuation">.</span>_metric<span class="token punctuation">,</span>
scoring_functions<span class="token operator">=</span>self<span class="token punctuation">.</span>_scoring_functions
<span class="token punctuation">)</span>
<span class="token keyword">return</span> automl
</code></pre>
<p> 可见其通过调用<code>_get_automl_class()</code>方法创建了<code>AutoML</code>类的一个实例,即上一段提到的自动化机器学习器(对应代码中的<code>self.automl_</code>对象)</p>
<p> 4. 在<code>build_automl()</code>创建了<code>self.automl_</code>对象之后,调用了<code>self.automl_.fit()</code>,即类<code>AutoML</code>的<code>fit()</code>方法,完成学习和训练过程。<br>
可见这个用户表面上调用的<code>fit()</code>函数实际上经过了三层不同的类的<code>fit()</code>方法的迭代,最终运行的是类<code>AutoML</code>的<code>fit()</code>方法,而这个最终版的<code>fit()</code>方法代码量较大,在这里就不再展示,感兴趣的读者可以直接进入官方github网站的<a href="https://github.com/automl/auto-sklearn/blob/master/autosklearn/automl.py">automl.py</a>文件进行更深入的研究。<br>
实际上,这也是我觉得该项目的设计中略不合理的地方,一个如此长的函数给代码的维护和阅读带来了及其不良的体验,也会带来大量代码的高度耦合,这并不是良好的程序设计风格。就面向对象程序设计而言,这也不符合封装和模块化的思想以及高内聚、低耦合的要求。</p>
<h1><a id="__399"></a>三. 核心流程设计分析</h1>
<h3><a id="1__400"></a>1. 类间关系</h3>
<p> 在上一节的分析中,我们提及了<code>AutoSklearnClassifier</code>及其父类,还有<code>AutoML</code>这三个类,它们以及其他相关类的类间关系如下图:</p>
<div class="mermaid"><svg id="mermaid-svg-WMBNXNDsysZGCJDk" width="1015.09375" xmlns="http://www.w3.org/2000/svg" height="513.515625" viewBox="-20 -20 1015.09375 513.515625"><style>#mermaid-svg-WMBNXNDsysZGCJDk .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-WMBNXNDsysZGCJDk .label text{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .node rect,#mermaid-svg-WMBNXNDsysZGCJDk .node circle,#mermaid-svg-WMBNXNDsysZGCJDk .node ellipse,#mermaid-svg-WMBNXNDsysZGCJDk .node polygon,#mermaid-svg-WMBNXNDsysZGCJDk .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-WMBNXNDsysZGCJDk .node .label{text-align:center;fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .node.clickable{cursor:pointer}#mermaid-svg-WMBNXNDsysZGCJDk .arrowheadPath{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-WMBNXNDsysZGCJDk .flowchart-link{stroke:#333;fill:none}#mermaid-svg-WMBNXNDsysZGCJDk .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-WMBNXNDsysZGCJDk .edgeLabel rect{opacity:0.9}#mermaid-svg-WMBNXNDsysZGCJDk .edgeLabel span{color:#333}#mermaid-svg-WMBNXNDsysZGCJDk .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-WMBNXNDsysZGCJDk .cluster text{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-WMBNXNDsysZGCJDk .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-WMBNXNDsysZGCJDk text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-WMBNXNDsysZGCJDk .actor-line{stroke:grey}#mermaid-svg-WMBNXNDsysZGCJDk .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-WMBNXNDsysZGCJDk .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-WMBNXNDsysZGCJDk #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-WMBNXNDsysZGCJDk .sequenceNumber{fill:#fff}#mermaid-svg-WMBNXNDsysZGCJDk #sequencenumber{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk #crosshead path{fill:#333;stroke:#333}#mermaid-svg-WMBNXNDsysZGCJDk .messageText{fill:#333;stroke:#333}#mermaid-svg-WMBNXNDsysZGCJDk .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-WMBNXNDsysZGCJDk .labelText,#mermaid-svg-WMBNXNDsysZGCJDk .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-WMBNXNDsysZGCJDk .loopText,#mermaid-svg-WMBNXNDsysZGCJDk .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-WMBNXNDsysZGCJDk .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-WMBNXNDsysZGCJDk .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-WMBNXNDsysZGCJDk .noteText,#mermaid-svg-WMBNXNDsysZGCJDk .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-WMBNXNDsysZGCJDk .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-WMBNXNDsysZGCJDk .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-WMBNXNDsysZGCJDk .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-WMBNXNDsysZGCJDk .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk .section{stroke:none;opacity:0.2}#mermaid-svg-WMBNXNDsysZGCJDk .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-WMBNXNDsysZGCJDk .section2{fill:#fff400}#mermaid-svg-WMBNXNDsysZGCJDk .section1,#mermaid-svg-WMBNXNDsysZGCJDk .section3{fill:#fff;opacity:0.2}#mermaid-svg-WMBNXNDsysZGCJDk .sectionTitle0{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .sectionTitle1{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .sectionTitle2{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .sectionTitle3{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-WMBNXNDsysZGCJDk .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk .grid path{stroke-width:0}#mermaid-svg-WMBNXNDsysZGCJDk .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-WMBNXNDsysZGCJDk .task{stroke-width:2}#mermaid-svg-WMBNXNDsysZGCJDk .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk .taskText:not([font-size]){font-size:11px}#mermaid-svg-WMBNXNDsysZGCJDk .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-WMBNXNDsysZGCJDk .task.clickable{cursor:pointer}#mermaid-svg-WMBNXNDsysZGCJDk .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-WMBNXNDsysZGCJDk .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-WMBNXNDsysZGCJDk .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-WMBNXNDsysZGCJDk .taskText0,#mermaid-svg-WMBNXNDsysZGCJDk .taskText1,#mermaid-svg-WMBNXNDsysZGCJDk .taskText2,#mermaid-svg-WMBNXNDsysZGCJDk .taskText3{fill:#fff}#mermaid-svg-WMBNXNDsysZGCJDk .task0,#mermaid-svg-WMBNXNDsysZGCJDk .task1,#mermaid-svg-WMBNXNDsysZGCJDk .task2,#mermaid-svg-WMBNXNDsysZGCJDk .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-WMBNXNDsysZGCJDk .taskTextOutside0,#mermaid-svg-WMBNXNDsysZGCJDk .taskTextOutside2{fill:#000}#mermaid-svg-WMBNXNDsysZGCJDk .taskTextOutside1,#mermaid-svg-WMBNXNDsysZGCJDk .taskTextOutside3{fill:#000}#mermaid-svg-WMBNXNDsysZGCJDk .active0,#mermaid-svg-WMBNXNDsysZGCJDk .active1,#mermaid-svg-WMBNXNDsysZGCJDk .active2,#mermaid-svg-WMBNXNDsysZGCJDk .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-WMBNXNDsysZGCJDk .activeText0,#mermaid-svg-WMBNXNDsysZGCJDk .activeText1,#mermaid-svg-WMBNXNDsysZGCJDk .activeText2,#mermaid-svg-WMBNXNDsysZGCJDk .activeText3{fill:#000 !important}#mermaid-svg-WMBNXNDsysZGCJDk .done0,#mermaid-svg-WMBNXNDsysZGCJDk .done1,#mermaid-svg-WMBNXNDsysZGCJDk .done2,#mermaid-svg-WMBNXNDsysZGCJDk .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-WMBNXNDsysZGCJDk .doneText0,#mermaid-svg-WMBNXNDsysZGCJDk .doneText1,#mermaid-svg-WMBNXNDsysZGCJDk .doneText2,#mermaid-svg-WMBNXNDsysZGCJDk .doneText3{fill:#000 !important}#mermaid-svg-WMBNXNDsysZGCJDk .crit0,#mermaid-svg-WMBNXNDsysZGCJDk .crit1,#mermaid-svg-WMBNXNDsysZGCJDk .crit2,#mermaid-svg-WMBNXNDsysZGCJDk .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-WMBNXNDsysZGCJDk .activeCrit0,#mermaid-svg-WMBNXNDsysZGCJDk .activeCrit1,#mermaid-svg-WMBNXNDsysZGCJDk .activeCrit2,#mermaid-svg-WMBNXNDsysZGCJDk .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-WMBNXNDsysZGCJDk .doneCrit0,#mermaid-svg-WMBNXNDsysZGCJDk .doneCrit1,#mermaid-svg-WMBNXNDsysZGCJDk .doneCrit2,#mermaid-svg-WMBNXNDsysZGCJDk .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-WMBNXNDsysZGCJDk .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-WMBNXNDsysZGCJDk .milestoneText{font-style:italic}#mermaid-svg-WMBNXNDsysZGCJDk .doneCritText0,#mermaid-svg-WMBNXNDsysZGCJDk .doneCritText1,#mermaid-svg-WMBNXNDsysZGCJDk .doneCritText2,#mermaid-svg-WMBNXNDsysZGCJDk .doneCritText3{fill:#000 !important}#mermaid-svg-WMBNXNDsysZGCJDk .activeCritText0,#mermaid-svg-WMBNXNDsysZGCJDk .activeCritText1,#mermaid-svg-WMBNXNDsysZGCJDk .activeCritText2,#mermaid-svg-WMBNXNDsysZGCJDk .activeCritText3{fill:#000 !important}#mermaid-svg-WMBNXNDsysZGCJDk .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-WMBNXNDsysZGCJDk g.classGroup text .title{font-weight:bolder}#mermaid-svg-WMBNXNDsysZGCJDk g.clickable{cursor:pointer}#mermaid-svg-WMBNXNDsysZGCJDk g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-WMBNXNDsysZGCJDk g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-WMBNXNDsysZGCJDk .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-WMBNXNDsysZGCJDk .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-WMBNXNDsysZGCJDk .dashed-line{stroke-dasharray:3}#mermaid-svg-WMBNXNDsysZGCJDk #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk .commit-id,#mermaid-svg-WMBNXNDsysZGCJDk .commit-msg,#mermaid-svg-WMBNXNDsysZGCJDk .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-WMBNXNDsysZGCJDk g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-WMBNXNDsysZGCJDk g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-WMBNXNDsysZGCJDk g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-WMBNXNDsysZGCJDk .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-WMBNXNDsysZGCJDk .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-WMBNXNDsysZGCJDk .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-WMBNXNDsysZGCJDk .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-WMBNXNDsysZGCJDk .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-WMBNXNDsysZGCJDk .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-WMBNXNDsysZGCJDk .edgeLabel text{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-WMBNXNDsysZGCJDk .node circle.state-start{fill:black;stroke:black}#mermaid-svg-WMBNXNDsysZGCJDk .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-WMBNXNDsysZGCJDk #statediagram-barbEnd{fill:#9370db}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-state .divider{stroke:#9370db}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-WMBNXNDsysZGCJDk .note-edge{stroke-dasharray:5}#mermaid-svg-WMBNXNDsysZGCJDk .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-WMBNXNDsysZGCJDk .error-icon{fill:#522}#mermaid-svg-WMBNXNDsysZGCJDk .error-text{fill:#522;stroke:#522}#mermaid-svg-WMBNXNDsysZGCJDk .edge-thickness-normal{stroke-width:2px}#mermaid-svg-WMBNXNDsysZGCJDk .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-WMBNXNDsysZGCJDk .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-WMBNXNDsysZGCJDk .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-WMBNXNDsysZGCJDk .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-WMBNXNDsysZGCJDk .marker{fill:#333}#mermaid-svg-WMBNXNDsysZGCJDk .marker.cross{stroke:#333}
:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}</style><style>#mermaid-svg-WMBNXNDsysZGCJDk {
color: rgba(0, 0, 0, 0.75);
font: ;
}</style><g></g><defs><marker id="extensionStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 1,7 L18,13 V 1 Z"></path></marker></defs><defs><marker id="extensionEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 1,1 V 13 L18,7 Z"></path></marker></defs><defs><marker id="compositionStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="compositionEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="aggregationStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="aggregationEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="dependencyStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 5,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="dependencyEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"></path></marker></defs><g id="classid-AutoSklearnEstimator-7264" class="classGroup " transform="translate(331.0234375,0 )"><rect x="0" y="0" width="155.890625" height="181.84375"></rect><text y="15" x="0"><tspan class="title" x="26.5625">AutoSklearnEstimator</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="155.890625"></line><text x="5" y="32.015625" fill="white" class="classText"><tspan x="5">automl_ : NoneType</tspan><tspan x="5" dy="10">time_left_for_this_task : int</tspan><tspan x="5" dy="10">per_run_time_limit : NoneType</tspan><tspan x="5" dy="10">tmp_folder : NoneType</tspan><tspan x="5" dy="10">output_folder : NoneType</tspan><tspan x="5" dy="10">n_jobs : NoneType</tspan><tspan x="5" dy="10">......</tspan></text><line x1="0" y1="99.03125" y2="99.03125" x2="155.890625"></line><text x="5" y="114.03125" fill="white" class="classText"><tspan x="5">build_automl()</tspan><tspan x="5" dy="10">fit()</tspan><tspan x="5" dy="10">predict(X, batch_size, n_jobs)</tspan><tspan x="5" dy="10">refit(X, y)</tspan><tspan x="5" dy="10">score(X, y)</tspan><tspan x="5" dy="10">show_models()</tspan><tspan x="5" dy="10">sprint_statistics()</tspan></text></g><g id="classid-AutoSklearnClassifier-7265" class="classGroup " transform="translate(0,261.84375 )"><rect x="0" y="0" width="239.3125" height="71.84375"></rect><text y="15" x="0"><tspan class="title" x="69.3125">AutoSklearnClassifier</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="239.3125"></line><text x="5" y="32.015625" fill="white" class="classText"><tspan x="5">target_type</tspan></text><line x1="0" y1="39.03125" y2="39.03125" x2="239.3125"></line><text x="5" y="54.03125" fill="white" class="classText"><tspan x="5">fit(X, y, X_test, y_test, feat_type, dataset_name)</tspan><tspan x="5" dy="10">predict(X, batch_size, n_jobs)</tspan></text></g><g id="classid-AutoSklearnRegressor-7266" class="classGroup " transform="translate(289.3125,267.8515625 )"><rect x="0" y="0" width="239.3125" height="59.828125"></rect><text y="15" x="0"><tspan class="title" x="67.9375">AutoSklearnRegressor</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="239.3125"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="239.3125"></line><text x="5" y="42.015625" fill="white" class="classText"><tspan x="5">fit(X, y, X_test, y_test, feat_type, dataset_name)</tspan><tspan x="5" dy="10">predict(X, batch_size, n_jobs)</tspan></text></g><g id="classid-AutoML-7267" class="classGroup " transform="translate(578.625,231.84375 )"><rect x="0" y="0" width="264.3125" height="131.84375"></rect><text y="15" x="0"><tspan class="title" x="113.890625">AutoML</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="264.3125"></line><text x="5" y="32.015625" fill="white" class="classText"><tspan x="5">models_ : NoneType, list</tspan><tspan x="5" dy="10">precision : int</tspan></text><line x1="0" y1="49.03125" y2="49.03125" x2="264.3125"></line><text x="5" y="64.03125" fill="white" class="classText"><tspan x="5">fit(X, y, task, X_test, y_test, feat_type, dataset_name)</tspan><tspan x="5" dy="10">get_models_with_weights()</tspan><tspan x="5" dy="10">predict(X, batch_size, n_jobs)</tspan><tspan x="5" dy="10">refit(X, y)</tspan><tspan x="5" dy="10">score(X, y)</tspan><tspan x="5" dy="10">show_models()</tspan><tspan x="5" dy="10">sprint_statistics()</tspan></text></g><g id="classid-AutoMLClassifier-7268" class="classGroup " transform="translate(446.46875,413.6875 )"><rect x="0" y="0" width="239.3125" height="59.828125"></rect><text y="15" x="0"><tspan class="title" x="80.21875">AutoMLClassifier</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="239.3125"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="239.3125"></line><text x="5" y="42.015625" fill="white" class="classText"><tspan x="5">fit(X, y, X_test, y_test, feat_type, dataset_name)</tspan><tspan x="5" dy="10">predict(X, batch_size, n_jobs)</tspan></text></g><g id="classid-AutoMLRegressor-7269" class="classGroup " transform="translate(735.78125,418.6875 )"><rect x="0" y="0" width="239.3125" height="49.828125"></rect><text y="15" x="0"><tspan class="title" x="78.84375">AutoMLRegressor</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="239.3125"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="239.3125"></line><text x="5" y="42.015625" fill="white" class="classText"><tspan x="5">fit(X, y, X_test, y_test, feat_type, dataset_name)</tspan></text></g><path d="M331.0234375,122.15304120422877L295.7955729166667,136.2681593368573C260.5677083333333,150.38327746948585,190.11197916666666,178.61351373474292,154.88411458333334,201.89529853403815C119.65625,225.17708333333334,119.65625,243.51041666666666,119.65625,252.67708333333334L119.65625,261.84375" id="edge5202" class="relation" marker-start="url(#extensionStart)"></path><path d="M408.96875,181.84375L408.96875,186.01041666666666C408.96875,190.17708333333334,408.96875,198.51041666666666,408.96875,212.84505208333334C408.96875,227.1796875,408.96875,247.515625,408.96875,257.68359375L408.96875,267.8515625" id="edge5203" class="relation" marker-start="url(#extensionStart)"></path><path d="M486.9140625,120.85955741030752L524.2252604166666,135.19025617525628C561.5364583333334,149.520954940205,636.1588541666666,178.1823524701025,673.4700520833334,196.6797179017179C710.78125,215.17708333333334,710.78125,223.51041666666666,710.78125,227.67708333333334L710.78125,231.84375" id="edge5204" class="relation" marker-end="url(#dependencyEnd)"></path><path d="M605.8998754081457,363.6875L599.2707295067881,367.8541666666667C592.6415836054305,372.0208333333333,579.3832918027152,380.3541666666667,572.7541459013577,388.6875C566.125,397.0208333333333,566.125,405.3541666666667,566.125,409.5208333333333L566.125,413.6875" id="edge5205" class="relation" marker-start="url(#extensionStart)"></path><path d="M815.6626245918543,363.6875L822.2917704932119,367.8541666666667C828.9209163945694,372.0208333333333,842.1792081972848,380.3541666666667,848.8083540986423,389.5208333333333C855.4375,398.6875,855.4375,408.6875,855.4375,413.6875L855.4375,418.6875" id="edge5206" class="relation" marker-start="url(#extensionStart)"></path></svg></div>
<p> 与分类器相类似的,机器学习任务中另一种非常重要的模型是回归器(regressor),因此回归器将作为与分类器相并列的一个类<code>AutoSklearnRegressor</code>而存在,它们的父类<code>AutoSklearnEstimator</code>与类<code>AutoML</code>相关联,从而能够在其自身的<code>fit()</code>方法中调用类<code>AutoML</code>的<code>fit()</code>方法。<br>
类<code>AutoML</code>下也实现了子类<code>AutoMLClassifier</code>和<code>AutoMLRegressor</code>,通过vscode工具查看引用发现这两个类下的<code>fit()</code>方法除了其自身没有被其他任何地方引用,这让我有些纳闷。<br>
<img src="https://img-blog.csdnimg.cn/20210130171126981.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pKMTAxOFJS,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br>
事实上,这两个子类的<code>fit()</code>方法也是通过<strong>super</strong>关键字调用<code>super().fit()</code>实现对类<code>AutoML</code>的<code>fit()</code>方法的最终调用的,因此这两个类的功能与之前提到的<code>AutoSklearnRegressor</code>和<code>AutoSklearnClassifier</code>两个类相比确实有一些重复,所以这也是我认为不太合理的地方,不知道是不是开发者为了提高代码的兼容性而故意保留的冗余部分。</p>
<h3><a id="2__457"></a>2. 时序图</h3>
<p> 根据之前的分析可以画出执行流程的时序图如下:<br>
<img src="https://img-blog.csdnimg.cn/202101302103325.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pKMTAxOFJS,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"></p>
<h1><a id="__460"></a>四. 高级设计意图分析</h1>
<h3><a id="1__461"></a>1. 策略模式</h3>
<p> 策略模式的目的是,针对一组算法,将每一个算法封装到具有共同接口的独立的类中,从而使得它们可以相互替换,在auto-sklearn或sklearn这样的机器学习库中,策略模式的应用是非常常见且典型的。<br>
比如,对于机器学习中的几个关键过程,分类(classification),回归(regression),数据预处理(data-preprocessing),和特征预处理(feature-preprocessing),每一个过程都有很多种不同的算法或方法来实现,如分类模型有adaboost、decision_tree、k_nearest_neighbors等等,在这个项目中,每一种算法被封装成一个独立的类,这些类均继承于一个与它们具有相同功能的抽象的类,这个类作为所有支持的算法的公共接口。components部分的base模块生成的类图如下:<br>
<img src="https://img-blog.csdnimg.cn/20210130221027911.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pKMTAxOFJS,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br>
其中<code>AutoSklearnClassificationAlgorithm</code>、<code>AutoSklearnPreprocessingAlgorithm</code>和<code>AutoSklearnRegressionAlgorithm</code>即为几个公共接口(Strategy),Context使用这个接口来调用某ConcreteStrategy定义的算法,而ConcreteStrategy即为各种具体的算法。包括了ConcreteStrategy部分的简略类图如下(为降低复杂性略去了类<code>IterativeComponent</code>和类<code>IterativeComponentWithSampleWeight</code>,且由于算法种类过多只展示部分算法,重点是表达设计思想):</p>
<div class="mermaid"><svg id="mermaid-svg-wVsuLjl2D2n4Z3V0" width="869.02734375" xmlns="http://www.w3.org/2000/svg" height="326.5" viewBox="-20 -20 869.02734375 326.5"><style>#mermaid-svg-wVsuLjl2D2n4Z3V0 .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .label text{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .node rect,#mermaid-svg-wVsuLjl2D2n4Z3V0 .node circle,#mermaid-svg-wVsuLjl2D2n4Z3V0 .node ellipse,#mermaid-svg-wVsuLjl2D2n4Z3V0 .node polygon,#mermaid-svg-wVsuLjl2D2n4Z3V0 .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .node .label{text-align:center;fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .node.clickable{cursor:pointer}#mermaid-svg-wVsuLjl2D2n4Z3V0 .arrowheadPath{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .flowchart-link{stroke:#333;fill:none}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edgeLabel rect{opacity:0.9}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edgeLabel span{color:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .cluster text{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-wVsuLjl2D2n4Z3V0 .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-wVsuLjl2D2n4Z3V0 text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-wVsuLjl2D2n4Z3V0 .actor-line{stroke:grey}#mermaid-svg-wVsuLjl2D2n4Z3V0 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .sequenceNumber{fill:#fff}#mermaid-svg-wVsuLjl2D2n4Z3V0 #sequencenumber{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 #crosshead path{fill:#333;stroke:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .messageText{fill:#333;stroke:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-wVsuLjl2D2n4Z3V0 .labelText,#mermaid-svg-wVsuLjl2D2n4Z3V0 .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-wVsuLjl2D2n4Z3V0 .loopText,#mermaid-svg-wVsuLjl2D2n4Z3V0 .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-wVsuLjl2D2n4Z3V0 .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-wVsuLjl2D2n4Z3V0 .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-wVsuLjl2D2n4Z3V0 .noteText,#mermaid-svg-wVsuLjl2D2n4Z3V0 .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-wVsuLjl2D2n4Z3V0 .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-wVsuLjl2D2n4Z3V0 .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-wVsuLjl2D2n4Z3V0 .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-wVsuLjl2D2n4Z3V0 .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .section{stroke:none;opacity:0.2}#mermaid-svg-wVsuLjl2D2n4Z3V0 .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .section2{fill:#fff400}#mermaid-svg-wVsuLjl2D2n4Z3V0 .section1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .section3{fill:#fff;opacity:0.2}#mermaid-svg-wVsuLjl2D2n4Z3V0 .sectionTitle0{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .sectionTitle1{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .sectionTitle2{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .sectionTitle3{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-wVsuLjl2D2n4Z3V0 .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .grid path{stroke-width:0}#mermaid-svg-wVsuLjl2D2n4Z3V0 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .task{stroke-width:2}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskText:not([font-size]){font-size:11px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .task.clickable{cursor:pointer}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskText0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskText1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskText2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskText3{fill:#fff}#mermaid-svg-wVsuLjl2D2n4Z3V0 .task0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .task1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .task2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskTextOutside0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskTextOutside2{fill:#000}#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskTextOutside1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .taskTextOutside3{fill:#000}#mermaid-svg-wVsuLjl2D2n4Z3V0 .active0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .active1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .active2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeText0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeText1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeText2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeText3{fill:#000 !important}#mermaid-svg-wVsuLjl2D2n4Z3V0 .done0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .done1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .done2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneText0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneText1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneText2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneText3{fill:#000 !important}#mermaid-svg-wVsuLjl2D2n4Z3V0 .crit0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .crit1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .crit2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeCrit0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeCrit1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeCrit2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneCrit0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneCrit1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneCrit2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-wVsuLjl2D2n4Z3V0 .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .milestoneText{font-style:italic}#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneCritText0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneCritText1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneCritText2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .doneCritText3{fill:#000 !important}#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeCritText0,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeCritText1,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeCritText2,#mermaid-svg-wVsuLjl2D2n4Z3V0 .activeCritText3{fill:#000 !important}#mermaid-svg-wVsuLjl2D2n4Z3V0 .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.classGroup text .title{font-weight:bolder}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.clickable{cursor:pointer}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-wVsuLjl2D2n4Z3V0 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-wVsuLjl2D2n4Z3V0 .dashed-line{stroke-dasharray:3}#mermaid-svg-wVsuLjl2D2n4Z3V0 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 .commit-id,#mermaid-svg-wVsuLjl2D2n4Z3V0 .commit-msg,#mermaid-svg-wVsuLjl2D2n4Z3V0 .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-wVsuLjl2D2n4Z3V0 g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-wVsuLjl2D2n4Z3V0 .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-wVsuLjl2D2n4Z3V0 .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-wVsuLjl2D2n4Z3V0 .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edgeLabel text{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wVsuLjl2D2n4Z3V0 .node circle.state-start{fill:black;stroke:black}#mermaid-svg-wVsuLjl2D2n4Z3V0 .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-wVsuLjl2D2n4Z3V0 #statediagram-barbEnd{fill:#9370db}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-state .divider{stroke:#9370db}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-wVsuLjl2D2n4Z3V0 .note-edge{stroke-dasharray:5}#mermaid-svg-wVsuLjl2D2n4Z3V0 .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-wVsuLjl2D2n4Z3V0 .error-icon{fill:#522}#mermaid-svg-wVsuLjl2D2n4Z3V0 .error-text{fill:#522;stroke:#522}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edge-thickness-normal{stroke-width:2px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-wVsuLjl2D2n4Z3V0 .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-wVsuLjl2D2n4Z3V0 .marker{fill:#333}#mermaid-svg-wVsuLjl2D2n4Z3V0 .marker.cross{stroke:#333}
:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}</style><style>#mermaid-svg-wVsuLjl2D2n4Z3V0 {
color: rgba(0, 0, 0, 0.75);
font: ;
}</style><g></g><defs><marker id="extensionStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 1,7 L18,13 V 1 Z"></path></marker></defs><defs><marker id="extensionEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 1,1 V 13 L18,7 Z"></path></marker></defs><defs><marker id="compositionStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="compositionEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="aggregationStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="aggregationEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="dependencyStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 5,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="dependencyEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"></path></marker></defs><g id="classid-AutoSklearnComponents-7270" class="classGroup " transform="translate(512.1640625,81.625 )"><rect x="0" y="0" width="125.65625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">AutoSklearnComponents</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="125.65625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="125.65625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnClassificationAlgorithm-7271" class="classGroup " transform="translate(60.21484375,163.25 )"><rect x="0" y="0" width="225.65625" height="41.625"></rect><text y="15" x="0"><tspan x="86.9140625">«interface»</tspan><tspan class="title" dy="10" x="30.328125">AutoSklearnClassificationAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="225.65625"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="225.65625"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnPreprocessingAlgorithm-7272" class="classGroup " transform="translate(335.87109375,163.25 )"><rect x="0" y="0" width="229.0625" height="41.625"></rect><text y="15" x="0"><tspan x="88.6171875">«interface»</tspan><tspan class="title" dy="10" x="30.328125">AutoSklearnPreprocessingAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="229.0625"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="229.0625"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnRegressionAlgorithm-7273" class="classGroup " transform="translate(614.93359375,163.25 )"><rect x="0" y="0" width="214.09375" height="41.625"></rect><text y="15" x="0"><tspan x="81.1328125">«interface»</tspan><tspan class="title" dy="10" x="30.3359375">AutoSklearnRegressionAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="214.09375"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="214.09375"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-BaseEstimator-7274" class="classGroup " transform="translate(536.6796875,0 )"><rect x="0" y="0" width="76.625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">BaseEstimator</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="76.625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="76.625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-AdaboostClassifier-7275" class="classGroup " transform="translate(0,254.875 )"><rect x="0" y="0" width="96.90625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">AdaboostClassifier</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="96.90625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="96.90625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-BernoulliNB-7276" class="classGroup " transform="translate(146.90625,254.875 )"><rect x="0" y="0" width="65.40625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">BernoulliNB</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="65.40625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="65.40625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-DecisionTree-7277" class="classGroup " transform="translate(262.3125,254.875 )"><rect x="0" y="0" width="70.640625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">DecisionTree</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="70.640625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="70.640625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-GaussianNB-7278" class="classGroup " transform="translate(382.953125,254.875 )"><rect x="0" y="0" width="63.859375" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">GaussianNB</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="63.859375"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="63.859375"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-KNearestNeighborsClassifier-7279" class="classGroup " transform="translate(496.8125,254.875 )"><rect x="0" y="0" width="141.84375" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">KNearestNeighborsClassifier</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="141.84375"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="141.84375"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><path d="M512.1640625,103.81684528032342L455.6438802083333,109.55570440026952C399.1236979166667,115.29456352021562,286.0833333333333,126.77228176010782,229.56315104166666,136.67780754672057C173.04296875,146.58333333333334,173.04296875,154.91666666666666,173.04296875,159.08333333333334L173.04296875,163.25" id="edge5207" class="relation" marker-start="url(#extensionStart)"></path><path d="M526.7207779000765,113.25L514.0010388750637,117.41666666666667C501.281299850051,121.58333333333333,475.84182180002546,129.91666666666666,463.12208277501276,138.25C450.40234375,146.58333333333334,450.40234375,154.91666666666666,450.40234375,159.08333333333334L450.40234375,163.25" id="edge5208" class="relation" marker-start="url(#extensionStart)"></path><path d="M631.9417053503063,113.25L646.9481659169219,117.41666666666667C661.9546264835375,121.58333333333333,691.9675476167687,129.91666666666666,706.9740081833843,138.25C721.98046875,146.58333333333334,721.98046875,154.91666666666666,721.98046875,159.08333333333334L721.98046875,163.25" id="edge5209" class="relation" marker-start="url(#extensionStart)"></path><path d="M574.9921875,31.625L574.9921875,35.791666666666664C574.9921875,39.958333333333336,574.9921875,48.291666666666664,574.9921875,56.625C574.9921875,64.95833333333333,574.9921875,73.29166666666667,574.9921875,77.45833333333333L574.9921875,81.625" id="edge5210" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M116.44212568212825,204.875L105.1106255684402,209.04166666666666C93.77912545475216,213.20833333333334,71.11612522737609,221.54166666666666,59.78462511368804,229.875C48.453125,238.20833333333334,48.453125,246.54166666666666,48.453125,250.70833333333334L48.453125,254.875" id="edge5211" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M176.02607008867668,204.875L176.62328757389722,209.04166666666666C177.22050505911776,213.20833333333334,178.4149400295589,221.54166666666666,179.01215751477943,229.875C179.609375,238.20833333333334,179.609375,246.54166666666666,179.609375,250.70833333333334L179.609375,254.875" id="edge5212" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M229.64381181787175,204.875L240.9753119315598,209.04166666666666C252.30681204524785,213.20833333333334,274.9698122726239,221.54166666666666,286.30131238631196,229.875C297.6328125,238.20833333333334,297.6328125,246.54166666666666,297.6328125,250.70833333333334L297.6328125,254.875" id="edge5213" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M282.91018289563436,204.875L304.9056211630286,209.04166666666666C326.9010594304229,213.20833333333334,370.8919359652114,221.54166666666666,392.88737423260574,229.875C414.8828125,238.20833333333334,414.8828125,246.54166666666666,414.8828125,250.70833333333334L414.8828125,254.875" id="edge5214" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M285.87109375,197.1586515622371L332.8483072916667,202.61137630186423C379.8255208333333,208.0641010414914,473.7799479166667,218.96955052074568,520.7571614583334,228.5889419270395C567.734375,238.20833333333334,567.734375,246.54166666666666,567.734375,250.70833333333334L567.734375,254.875" id="edge5215" class="relation dashed-line" marker-start="url(#extensionStart)"></path></svg></div>
<div class="mermaid"><svg id="mermaid-svg-pbT5XgdQMJB7vFvT" width="808.8125" xmlns="http://www.w3.org/2000/svg" height="326.5" viewBox="-20 -20 808.8125 326.5"><style>#mermaid-svg-pbT5XgdQMJB7vFvT .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .label text{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .node rect,#mermaid-svg-pbT5XgdQMJB7vFvT .node circle,#mermaid-svg-pbT5XgdQMJB7vFvT .node ellipse,#mermaid-svg-pbT5XgdQMJB7vFvT .node polygon,#mermaid-svg-pbT5XgdQMJB7vFvT .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-pbT5XgdQMJB7vFvT .node .label{text-align:center;fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .node.clickable{cursor:pointer}#mermaid-svg-pbT5XgdQMJB7vFvT .arrowheadPath{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-pbT5XgdQMJB7vFvT .flowchart-link{stroke:#333;fill:none}#mermaid-svg-pbT5XgdQMJB7vFvT .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-pbT5XgdQMJB7vFvT .edgeLabel rect{opacity:0.9}#mermaid-svg-pbT5XgdQMJB7vFvT .edgeLabel span{color:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-pbT5XgdQMJB7vFvT .cluster text{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-pbT5XgdQMJB7vFvT .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-pbT5XgdQMJB7vFvT text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-pbT5XgdQMJB7vFvT .actor-line{stroke:grey}#mermaid-svg-pbT5XgdQMJB7vFvT .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-pbT5XgdQMJB7vFvT #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .sequenceNumber{fill:#fff}#mermaid-svg-pbT5XgdQMJB7vFvT #sequencenumber{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT #crosshead path{fill:#333;stroke:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .messageText{fill:#333;stroke:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-pbT5XgdQMJB7vFvT .labelText,#mermaid-svg-pbT5XgdQMJB7vFvT .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-pbT5XgdQMJB7vFvT .loopText,#mermaid-svg-pbT5XgdQMJB7vFvT .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-pbT5XgdQMJB7vFvT .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-pbT5XgdQMJB7vFvT .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-pbT5XgdQMJB7vFvT .noteText,#mermaid-svg-pbT5XgdQMJB7vFvT .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-pbT5XgdQMJB7vFvT .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-pbT5XgdQMJB7vFvT .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-pbT5XgdQMJB7vFvT .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-pbT5XgdQMJB7vFvT .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT .section{stroke:none;opacity:0.2}#mermaid-svg-pbT5XgdQMJB7vFvT .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-pbT5XgdQMJB7vFvT .section2{fill:#fff400}#mermaid-svg-pbT5XgdQMJB7vFvT .section1,#mermaid-svg-pbT5XgdQMJB7vFvT .section3{fill:#fff;opacity:0.2}#mermaid-svg-pbT5XgdQMJB7vFvT .sectionTitle0{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .sectionTitle1{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .sectionTitle2{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .sectionTitle3{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-pbT5XgdQMJB7vFvT .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT .grid path{stroke-width:0}#mermaid-svg-pbT5XgdQMJB7vFvT .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-pbT5XgdQMJB7vFvT .task{stroke-width:2}#mermaid-svg-pbT5XgdQMJB7vFvT .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT .taskText:not([font-size]){font-size:11px}#mermaid-svg-pbT5XgdQMJB7vFvT .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-pbT5XgdQMJB7vFvT .task.clickable{cursor:pointer}#mermaid-svg-pbT5XgdQMJB7vFvT .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-pbT5XgdQMJB7vFvT .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-pbT5XgdQMJB7vFvT .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-pbT5XgdQMJB7vFvT .taskText0,#mermaid-svg-pbT5XgdQMJB7vFvT .taskText1,#mermaid-svg-pbT5XgdQMJB7vFvT .taskText2,#mermaid-svg-pbT5XgdQMJB7vFvT .taskText3{fill:#fff}#mermaid-svg-pbT5XgdQMJB7vFvT .task0,#mermaid-svg-pbT5XgdQMJB7vFvT .task1,#mermaid-svg-pbT5XgdQMJB7vFvT .task2,#mermaid-svg-pbT5XgdQMJB7vFvT .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-pbT5XgdQMJB7vFvT .taskTextOutside0,#mermaid-svg-pbT5XgdQMJB7vFvT .taskTextOutside2{fill:#000}#mermaid-svg-pbT5XgdQMJB7vFvT .taskTextOutside1,#mermaid-svg-pbT5XgdQMJB7vFvT .taskTextOutside3{fill:#000}#mermaid-svg-pbT5XgdQMJB7vFvT .active0,#mermaid-svg-pbT5XgdQMJB7vFvT .active1,#mermaid-svg-pbT5XgdQMJB7vFvT .active2,#mermaid-svg-pbT5XgdQMJB7vFvT .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-pbT5XgdQMJB7vFvT .activeText0,#mermaid-svg-pbT5XgdQMJB7vFvT .activeText1,#mermaid-svg-pbT5XgdQMJB7vFvT .activeText2,#mermaid-svg-pbT5XgdQMJB7vFvT .activeText3{fill:#000 !important}#mermaid-svg-pbT5XgdQMJB7vFvT .done0,#mermaid-svg-pbT5XgdQMJB7vFvT .done1,#mermaid-svg-pbT5XgdQMJB7vFvT .done2,#mermaid-svg-pbT5XgdQMJB7vFvT .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-pbT5XgdQMJB7vFvT .doneText0,#mermaid-svg-pbT5XgdQMJB7vFvT .doneText1,#mermaid-svg-pbT5XgdQMJB7vFvT .doneText2,#mermaid-svg-pbT5XgdQMJB7vFvT .doneText3{fill:#000 !important}#mermaid-svg-pbT5XgdQMJB7vFvT .crit0,#mermaid-svg-pbT5XgdQMJB7vFvT .crit1,#mermaid-svg-pbT5XgdQMJB7vFvT .crit2,#mermaid-svg-pbT5XgdQMJB7vFvT .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-pbT5XgdQMJB7vFvT .activeCrit0,#mermaid-svg-pbT5XgdQMJB7vFvT .activeCrit1,#mermaid-svg-pbT5XgdQMJB7vFvT .activeCrit2,#mermaid-svg-pbT5XgdQMJB7vFvT .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-pbT5XgdQMJB7vFvT .doneCrit0,#mermaid-svg-pbT5XgdQMJB7vFvT .doneCrit1,#mermaid-svg-pbT5XgdQMJB7vFvT .doneCrit2,#mermaid-svg-pbT5XgdQMJB7vFvT .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-pbT5XgdQMJB7vFvT .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-pbT5XgdQMJB7vFvT .milestoneText{font-style:italic}#mermaid-svg-pbT5XgdQMJB7vFvT .doneCritText0,#mermaid-svg-pbT5XgdQMJB7vFvT .doneCritText1,#mermaid-svg-pbT5XgdQMJB7vFvT .doneCritText2,#mermaid-svg-pbT5XgdQMJB7vFvT .doneCritText3{fill:#000 !important}#mermaid-svg-pbT5XgdQMJB7vFvT .activeCritText0,#mermaid-svg-pbT5XgdQMJB7vFvT .activeCritText1,#mermaid-svg-pbT5XgdQMJB7vFvT .activeCritText2,#mermaid-svg-pbT5XgdQMJB7vFvT .activeCritText3{fill:#000 !important}#mermaid-svg-pbT5XgdQMJB7vFvT .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-pbT5XgdQMJB7vFvT g.classGroup text .title{font-weight:bolder}#mermaid-svg-pbT5XgdQMJB7vFvT g.clickable{cursor:pointer}#mermaid-svg-pbT5XgdQMJB7vFvT g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-pbT5XgdQMJB7vFvT g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-pbT5XgdQMJB7vFvT .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-pbT5XgdQMJB7vFvT .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-pbT5XgdQMJB7vFvT .dashed-line{stroke-dasharray:3}#mermaid-svg-pbT5XgdQMJB7vFvT #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT .commit-id,#mermaid-svg-pbT5XgdQMJB7vFvT .commit-msg,#mermaid-svg-pbT5XgdQMJB7vFvT .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-pbT5XgdQMJB7vFvT g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-pbT5XgdQMJB7vFvT g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-pbT5XgdQMJB7vFvT g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-pbT5XgdQMJB7vFvT .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-pbT5XgdQMJB7vFvT .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-pbT5XgdQMJB7vFvT .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-pbT5XgdQMJB7vFvT .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-pbT5XgdQMJB7vFvT .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-pbT5XgdQMJB7vFvT .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-pbT5XgdQMJB7vFvT .edgeLabel text{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-pbT5XgdQMJB7vFvT .node circle.state-start{fill:black;stroke:black}#mermaid-svg-pbT5XgdQMJB7vFvT .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-pbT5XgdQMJB7vFvT #statediagram-barbEnd{fill:#9370db}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-state .divider{stroke:#9370db}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-pbT5XgdQMJB7vFvT .note-edge{stroke-dasharray:5}#mermaid-svg-pbT5XgdQMJB7vFvT .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-pbT5XgdQMJB7vFvT .error-icon{fill:#522}#mermaid-svg-pbT5XgdQMJB7vFvT .error-text{fill:#522;stroke:#522}#mermaid-svg-pbT5XgdQMJB7vFvT .edge-thickness-normal{stroke-width:2px}#mermaid-svg-pbT5XgdQMJB7vFvT .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-pbT5XgdQMJB7vFvT .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-pbT5XgdQMJB7vFvT .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-pbT5XgdQMJB7vFvT .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-pbT5XgdQMJB7vFvT .marker{fill:#333}#mermaid-svg-pbT5XgdQMJB7vFvT .marker.cross{stroke:#333}
:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}</style><style>#mermaid-svg-pbT5XgdQMJB7vFvT {
color: rgba(0, 0, 0, 0.75);
font: ;
}</style><g></g><defs><marker id="extensionStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 1,7 L18,13 V 1 Z"></path></marker></defs><defs><marker id="extensionEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 1,1 V 13 L18,7 Z"></path></marker></defs><defs><marker id="compositionStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="compositionEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="aggregationStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="aggregationEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="dependencyStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 5,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="dependencyEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"></path></marker></defs><g id="classid-AutoSklearnComponents-7280" class="classGroup " transform="translate(327.359375,81.625 )"><rect x="0" y="0" width="125.65625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">AutoSklearnComponents</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="125.65625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="125.65625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnClassificationAlgorithm-7281" class="classGroup " transform="translate(0,163.25 )"><rect x="0" y="0" width="225.65625" height="41.625"></rect><text y="15" x="0"><tspan x="86.9140625">«interface»</tspan><tspan class="title" dy="10" x="30.328125">AutoSklearnClassificationAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="225.65625"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="225.65625"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnPreprocessingAlgorithm-7282" class="classGroup " transform="translate(275.65625,163.25 )"><rect x="0" y="0" width="229.0625" height="41.625"></rect><text y="15" x="0"><tspan x="88.6171875">«interface»</tspan><tspan class="title" dy="10" x="30.328125">AutoSklearnPreprocessingAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="229.0625"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="229.0625"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnRegressionAlgorithm-7283" class="classGroup " transform="translate(554.71875,163.25 )"><rect x="0" y="0" width="214.09375" height="41.625"></rect><text y="15" x="0"><tspan x="81.1328125">«interface»</tspan><tspan class="title" dy="10" x="30.3359375">AutoSklearnRegressionAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="214.09375"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="214.09375"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-BaseEstimator-7284" class="classGroup " transform="translate(351.875,0 )"><rect x="0" y="0" width="76.625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">BaseEstimator</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="76.625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="76.625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-PCA-7285" class="classGroup " transform="translate(161.05859375,254.875 )"><rect x="0" y="0" width="29.1875" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">PCA</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="29.1875"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="29.1875"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-RandomTreesEmbedding-7286" class="classGroup " transform="translate(240.24609375,254.875 )"><rect x="0" y="0" width="124.515625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">RandomTreesEmbedding</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="124.515625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="124.515625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-SelectClassificationRates-7287" class="classGroup " transform="translate(414.76171875,254.875 )"><rect x="0" y="0" width="126.21875" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">SelectClassificationRates</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="126.21875"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="126.21875"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-LibLinear_Preprocessor-7288" class="classGroup " transform="translate(590.98046875,254.875 )"><rect x="0" y="0" width="121.53125" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">LibLinear_Preprocessor</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="121.53125"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="121.53125"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><path d="M327.359375,106.68244746774829L291.6041666666667,111.94370622312357C255.84895833333334,117.20496497849886,184.33854166666666,127.72748248924943,148.58333333333334,137.15540791129138C112.828125,146.58333333333334,112.828125,154.91666666666666,112.828125,159.08333333333334L112.828125,163.25" id="edge5216" class="relation" marker-start="url(#extensionStart)"></path><path d="M390.1875,113.25L390.1875,117.41666666666667C390.1875,121.58333333333333,390.1875,129.91666666666666,390.1875,138.25C390.1875,146.58333333333334,390.1875,154.91666666666666,390.1875,159.08333333333334L390.1875,163.25" id="edge5217" class="relation" marker-start="url(#extensionStart)"></path><path d="M453.015625,106.87925033082101L487.8072916666667,112.10770860901751C522.5989583333334,117.336166887214,592.1822916666666,127.79308344360702,626.9739583333334,137.18820838847017C661.765625,146.58333333333334,661.765625,154.91666666666666,661.765625,159.08333333333334L661.765625,163.25" id="edge5218" class="relation" marker-start="url(#extensionStart)"></path><path d="M390.1875,31.625L390.1875,35.791666666666664C390.1875,39.958333333333336,390.1875,48.291666666666664,390.1875,56.625C390.1875,64.95833333333333,390.1875,73.29166666666667,390.1875,77.45833333333333L390.1875,81.625" id="edge5219" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M292.7247346094816,204.875L273.2126694662347,209.04166666666666C253.70060432298772,213.20833333333334,214.6764740364939,221.54166666666666,195.16440889324693,229.875C175.65234375,238.20833333333334,175.65234375,246.54166666666666,175.65234375,250.70833333333334L175.65234375,254.875" id="edge5220" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M350.3530706429059,204.875L342.37820991075495,209.04166666666666C334.40334917860395,213.20833333333334,318.45362771430194,221.54166666666666,310.478766982151,229.875C302.50390625,238.20833333333334,302.50390625,246.54166666666666,302.50390625,250.70833333333334L302.50390625,254.875" id="edge5221" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M430.0219293570941,204.875L437.99679008924505,209.04166666666666C445.97165082139605,213.20833333333334,461.921372285698,221.54166666666666,469.896233017849,229.875C477.87109375,238.20833333333334,477.87109375,246.54166666666666,477.87109375,250.70833333333334L477.87109375,254.875" id="edge5222" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M504.71875,204.1228727654236L529.2233072916666,208.41489397118633C553.7278645833334,212.70691517694908,602.7369791666666,221.29095758847453,627.2415364583334,229.74964546090393C651.74609375,238.20833333333334,651.74609375,246.54166666666666,651.74609375,250.70833333333334L651.74609375,254.875" id="edge5223" class="relation dashed-line" marker-start="url(#extensionStart)"></path></svg></div>
<div class="mermaid"><svg id="mermaid-svg-EcB4iUAoz3yx4EuK" width="880.55859375" xmlns="http://www.w3.org/2000/svg" height="326.5" viewBox="-20 -20 880.55859375 326.5"><style>#mermaid-svg-EcB4iUAoz3yx4EuK .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .label text{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .node rect,#mermaid-svg-EcB4iUAoz3yx4EuK .node circle,#mermaid-svg-EcB4iUAoz3yx4EuK .node ellipse,#mermaid-svg-EcB4iUAoz3yx4EuK .node polygon,#mermaid-svg-EcB4iUAoz3yx4EuK .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-EcB4iUAoz3yx4EuK .node .label{text-align:center;fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .node.clickable{cursor:pointer}#mermaid-svg-EcB4iUAoz3yx4EuK .arrowheadPath{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-EcB4iUAoz3yx4EuK .flowchart-link{stroke:#333;fill:none}#mermaid-svg-EcB4iUAoz3yx4EuK .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-EcB4iUAoz3yx4EuK .edgeLabel rect{opacity:0.9}#mermaid-svg-EcB4iUAoz3yx4EuK .edgeLabel span{color:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-EcB4iUAoz3yx4EuK .cluster text{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-EcB4iUAoz3yx4EuK .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-EcB4iUAoz3yx4EuK text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-EcB4iUAoz3yx4EuK .actor-line{stroke:grey}#mermaid-svg-EcB4iUAoz3yx4EuK .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-EcB4iUAoz3yx4EuK #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .sequenceNumber{fill:#fff}#mermaid-svg-EcB4iUAoz3yx4EuK #sequencenumber{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK #crosshead path{fill:#333;stroke:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .messageText{fill:#333;stroke:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-EcB4iUAoz3yx4EuK .labelText,#mermaid-svg-EcB4iUAoz3yx4EuK .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-EcB4iUAoz3yx4EuK .loopText,#mermaid-svg-EcB4iUAoz3yx4EuK .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-EcB4iUAoz3yx4EuK .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-EcB4iUAoz3yx4EuK .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-EcB4iUAoz3yx4EuK .noteText,#mermaid-svg-EcB4iUAoz3yx4EuK .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-EcB4iUAoz3yx4EuK .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-EcB4iUAoz3yx4EuK .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-EcB4iUAoz3yx4EuK .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-EcB4iUAoz3yx4EuK .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK .section{stroke:none;opacity:0.2}#mermaid-svg-EcB4iUAoz3yx4EuK .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-EcB4iUAoz3yx4EuK .section2{fill:#fff400}#mermaid-svg-EcB4iUAoz3yx4EuK .section1,#mermaid-svg-EcB4iUAoz3yx4EuK .section3{fill:#fff;opacity:0.2}#mermaid-svg-EcB4iUAoz3yx4EuK .sectionTitle0{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .sectionTitle1{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .sectionTitle2{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .sectionTitle3{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-EcB4iUAoz3yx4EuK .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK .grid path{stroke-width:0}#mermaid-svg-EcB4iUAoz3yx4EuK .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-EcB4iUAoz3yx4EuK .task{stroke-width:2}#mermaid-svg-EcB4iUAoz3yx4EuK .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK .taskText:not([font-size]){font-size:11px}#mermaid-svg-EcB4iUAoz3yx4EuK .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-EcB4iUAoz3yx4EuK .task.clickable{cursor:pointer}#mermaid-svg-EcB4iUAoz3yx4EuK .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-EcB4iUAoz3yx4EuK .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-EcB4iUAoz3yx4EuK .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-EcB4iUAoz3yx4EuK .taskText0,#mermaid-svg-EcB4iUAoz3yx4EuK .taskText1,#mermaid-svg-EcB4iUAoz3yx4EuK .taskText2,#mermaid-svg-EcB4iUAoz3yx4EuK .taskText3{fill:#fff}#mermaid-svg-EcB4iUAoz3yx4EuK .task0,#mermaid-svg-EcB4iUAoz3yx4EuK .task1,#mermaid-svg-EcB4iUAoz3yx4EuK .task2,#mermaid-svg-EcB4iUAoz3yx4EuK .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-EcB4iUAoz3yx4EuK .taskTextOutside0,#mermaid-svg-EcB4iUAoz3yx4EuK .taskTextOutside2{fill:#000}#mermaid-svg-EcB4iUAoz3yx4EuK .taskTextOutside1,#mermaid-svg-EcB4iUAoz3yx4EuK .taskTextOutside3{fill:#000}#mermaid-svg-EcB4iUAoz3yx4EuK .active0,#mermaid-svg-EcB4iUAoz3yx4EuK .active1,#mermaid-svg-EcB4iUAoz3yx4EuK .active2,#mermaid-svg-EcB4iUAoz3yx4EuK .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-EcB4iUAoz3yx4EuK .activeText0,#mermaid-svg-EcB4iUAoz3yx4EuK .activeText1,#mermaid-svg-EcB4iUAoz3yx4EuK .activeText2,#mermaid-svg-EcB4iUAoz3yx4EuK .activeText3{fill:#000 !important}#mermaid-svg-EcB4iUAoz3yx4EuK .done0,#mermaid-svg-EcB4iUAoz3yx4EuK .done1,#mermaid-svg-EcB4iUAoz3yx4EuK .done2,#mermaid-svg-EcB4iUAoz3yx4EuK .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-EcB4iUAoz3yx4EuK .doneText0,#mermaid-svg-EcB4iUAoz3yx4EuK .doneText1,#mermaid-svg-EcB4iUAoz3yx4EuK .doneText2,#mermaid-svg-EcB4iUAoz3yx4EuK .doneText3{fill:#000 !important}#mermaid-svg-EcB4iUAoz3yx4EuK .crit0,#mermaid-svg-EcB4iUAoz3yx4EuK .crit1,#mermaid-svg-EcB4iUAoz3yx4EuK .crit2,#mermaid-svg-EcB4iUAoz3yx4EuK .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-EcB4iUAoz3yx4EuK .activeCrit0,#mermaid-svg-EcB4iUAoz3yx4EuK .activeCrit1,#mermaid-svg-EcB4iUAoz3yx4EuK .activeCrit2,#mermaid-svg-EcB4iUAoz3yx4EuK .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-EcB4iUAoz3yx4EuK .doneCrit0,#mermaid-svg-EcB4iUAoz3yx4EuK .doneCrit1,#mermaid-svg-EcB4iUAoz3yx4EuK .doneCrit2,#mermaid-svg-EcB4iUAoz3yx4EuK .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-EcB4iUAoz3yx4EuK .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-EcB4iUAoz3yx4EuK .milestoneText{font-style:italic}#mermaid-svg-EcB4iUAoz3yx4EuK .doneCritText0,#mermaid-svg-EcB4iUAoz3yx4EuK .doneCritText1,#mermaid-svg-EcB4iUAoz3yx4EuK .doneCritText2,#mermaid-svg-EcB4iUAoz3yx4EuK .doneCritText3{fill:#000 !important}#mermaid-svg-EcB4iUAoz3yx4EuK .activeCritText0,#mermaid-svg-EcB4iUAoz3yx4EuK .activeCritText1,#mermaid-svg-EcB4iUAoz3yx4EuK .activeCritText2,#mermaid-svg-EcB4iUAoz3yx4EuK .activeCritText3{fill:#000 !important}#mermaid-svg-EcB4iUAoz3yx4EuK .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-EcB4iUAoz3yx4EuK g.classGroup text .title{font-weight:bolder}#mermaid-svg-EcB4iUAoz3yx4EuK g.clickable{cursor:pointer}#mermaid-svg-EcB4iUAoz3yx4EuK g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-EcB4iUAoz3yx4EuK g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-EcB4iUAoz3yx4EuK .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-EcB4iUAoz3yx4EuK .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-EcB4iUAoz3yx4EuK .dashed-line{stroke-dasharray:3}#mermaid-svg-EcB4iUAoz3yx4EuK #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK .commit-id,#mermaid-svg-EcB4iUAoz3yx4EuK .commit-msg,#mermaid-svg-EcB4iUAoz3yx4EuK .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-EcB4iUAoz3yx4EuK g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-EcB4iUAoz3yx4EuK g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-EcB4iUAoz3yx4EuK g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-EcB4iUAoz3yx4EuK .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-EcB4iUAoz3yx4EuK .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-EcB4iUAoz3yx4EuK .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-EcB4iUAoz3yx4EuK .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-EcB4iUAoz3yx4EuK .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-EcB4iUAoz3yx4EuK .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-EcB4iUAoz3yx4EuK .edgeLabel text{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-EcB4iUAoz3yx4EuK .node circle.state-start{fill:black;stroke:black}#mermaid-svg-EcB4iUAoz3yx4EuK .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-EcB4iUAoz3yx4EuK #statediagram-barbEnd{fill:#9370db}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-state .divider{stroke:#9370db}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-EcB4iUAoz3yx4EuK .note-edge{stroke-dasharray:5}#mermaid-svg-EcB4iUAoz3yx4EuK .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-EcB4iUAoz3yx4EuK .error-icon{fill:#522}#mermaid-svg-EcB4iUAoz3yx4EuK .error-text{fill:#522;stroke:#522}#mermaid-svg-EcB4iUAoz3yx4EuK .edge-thickness-normal{stroke-width:2px}#mermaid-svg-EcB4iUAoz3yx4EuK .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-EcB4iUAoz3yx4EuK .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-EcB4iUAoz3yx4EuK .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-EcB4iUAoz3yx4EuK .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-EcB4iUAoz3yx4EuK .marker{fill:#333}#mermaid-svg-EcB4iUAoz3yx4EuK .marker.cross{stroke:#333}
:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}</style><style>#mermaid-svg-EcB4iUAoz3yx4EuK {
color: rgba(0, 0, 0, 0.75);
font: ;
}</style><g></g><defs><marker id="extensionStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 1,7 L18,13 V 1 Z"></path></marker></defs><defs><marker id="extensionEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 1,1 V 13 L18,7 Z"></path></marker></defs><defs><marker id="compositionStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="compositionEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="aggregationStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="aggregationEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="dependencyStart" class="extension" refX="0" refY="7" markerWidth="190" markerHeight="240" orient="auto"><path d="M 5,7 L9,13 L1,7 L9,1 Z"></path></marker></defs><defs><marker id="dependencyEnd" refX="19" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"></path></marker></defs><g id="classid-AutoSklearnComponents-7289" class="classGroup " transform="translate(216.88671875,81.625 )"><rect x="0" y="0" width="125.65625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">AutoSklearnComponents</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="125.65625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="125.65625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnClassificationAlgorithm-7290" class="classGroup " transform="translate(0,163.25 )"><rect x="0" y="0" width="225.65625" height="41.625"></rect><text y="15" x="0"><tspan x="86.9140625">«interface»</tspan><tspan class="title" dy="10" x="30.328125">AutoSklearnClassificationAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="225.65625"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="225.65625"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnPreprocessingAlgorithm-7291" class="classGroup " transform="translate(275.65625,163.25 )"><rect x="0" y="0" width="229.0625" height="41.625"></rect><text y="15" x="0"><tspan x="88.6171875">«interface»</tspan><tspan class="title" dy="10" x="30.328125">AutoSklearnPreprocessingAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="229.0625"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="229.0625"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-AutoSklearnRegressionAlgorithm-7292" class="classGroup " transform="translate(554.71875,163.25 )"><rect x="0" y="0" width="214.09375" height="41.625"></rect><text y="15" x="0"><tspan x="81.1328125">«interface»</tspan><tspan class="title" dy="10" x="30.3359375">AutoSklearnRegressionAlgorithm</tspan></text><line x1="0" y1="32.015625" y2="32.015625" x2="214.09375"></line><text x="5" y="42.015625" fill="white" class="classText"></text><line x1="0" y1="37.015625" y2="37.015625" x2="214.09375"></line><text x="5" y="52.015625" fill="white" class="classText"></text></g><g id="classid-BaseEstimator-7293" class="classGroup " transform="translate(241.40234375,0 )"><rect x="0" y="0" width="76.625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">BaseEstimator</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="76.625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="76.625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-ARDRegression-7294" class="classGroup " transform="translate(183.18359375,254.875 )"><rect x="0" y="0" width="80.234375" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">ARDRegression</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="80.234375"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="80.234375"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-KNearestNeighborsRegressor-7295" class="classGroup " transform="translate(313.41796875,254.875 )"><rect x="0" y="0" width="144.59375" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">KNearestNeighborsRegressor</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="144.59375"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="144.59375"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-GaussianProcess-7296" class="classGroup " transform="translate(508.01171875,254.875 )"><rect x="0" y="0" width="86.5625" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">GaussianProcess</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="86.5625"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="86.5625"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-LibSVM_SVR-7297" class="classGroup " transform="translate(644.57421875,254.875 )"><rect x="0" y="0" width="67.5" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">LibSVM_SVR</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="67.5"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="67.5"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><g id="classid-LibLinear_SVR-7298" class="classGroup " transform="translate(762.07421875,254.875 )"><rect x="0" y="0" width="78.484375" height="31.625"></rect><text y="15" x="0"><tspan class="title" x="5">LibLinear_SVR</tspan></text><line x1="0" y1="22.015625" y2="22.015625" x2="78.484375"></line><text x="5" y="32.015625" fill="white" class="classText"></text><line x1="0" y1="27.015625" y2="27.015625" x2="78.484375"></line><text x="5" y="42.015625" fill="white" class="classText"></text></g><path d="M216.88671875,112.8022508367858L199.54361979166666,117.04354236398818C182.20052083333334,121.28483389119053,147.51432291666666,129.76741694559527,130.17122395833334,138.1753751394643C112.828125,146.58333333333334,112.828125,154.91666666666666,112.828125,159.08333333333334L112.828125,163.25" id="edge5224" class="relation" marker-start="url(#extensionStart)"></path><path d="M322.5166539050536,113.25L333.7951282542113,117.41666666666667C345.073602603369,121.58333333333333,367.63055130168453,129.91666666666666,378.90902565084224,138.25C390.1875,146.58333333333334,390.1875,154.91666666666666,390.1875,159.08333333333334L390.1875,163.25" id="edge5225" class="relation" marker-start="url(#extensionStart)"></path><path d="M342.54296875,104.14910216757835L395.7467447916667,109.83258513964863C448.9505208333333,115.5160681117189,555.3580729166666,126.88303405585945,608.5618489583334,136.7331836945964C661.765625,146.58333333333334,661.765625,154.91666666666666,661.765625,159.08333333333334L661.765625,163.25" id="edge5226" class="relation" marker-start="url(#extensionStart)"></path><path d="M279.71484375,31.625L279.71484375,35.791666666666664C279.71484375,39.958333333333336,279.71484375,48.291666666666664,279.71484375,56.625C279.71484375,64.95833333333333,279.71484375,73.29166666666667,279.71484375,77.45833333333333L279.71484375,81.625" id="edge5227" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M554.71875,195.24717085980026L499.482421875,201.01847571650023C444.24609375,206.78978057320015,333.7734375,218.3323902866001,278.537109375,228.27036180996672C223.30078125,238.20833333333334,223.30078125,246.54166666666666,223.30078125,250.70833333333334L223.30078125,254.875" id="edge5228" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M554.71875,201.82765515997113L526.5514322916666,206.50221263330926C498.3841145833333,211.1767701066474,442.0494791666667,220.5258850533237,413.8821614583333,229.3671091933285C385.71484375,238.20833333333334,385.71484375,246.54166666666666,385.71484375,250.70833333333334L385.71484375,254.875" id="edge5229" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M611.5781836203956,204.875L601.530647808663,209.04166666666666C591.4831119969305,213.20833333333334,571.3880403734652,221.54166666666666,561.3405045617326,229.875C551.29296875,238.20833333333334,551.29296875,246.54166666666666,551.29296875,250.70833333333334L551.29296875,254.875" id="edge5230" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M669.2881512193043,204.875L670.7941624744202,209.04166666666666C672.3001737295361,213.20833333333334,675.3121962397681,221.54166666666666,676.8182074948841,229.875C678.32421875,238.20833333333334,678.32421875,246.54166666666666,678.32421875,250.70833333333334L678.32421875,254.875" id="edge5231" class="relation dashed-line" marker-start="url(#extensionStart)"></path><path d="M725.1631831940655,204.875L737.8553870367213,209.04166666666666C750.5475908793769,213.20833333333334,775.9319985646885,221.54166666666666,788.6242024073441,229.875C801.31640625,238.20833333333334,801.31640625,246.54166666666666,801.31640625,250.70833333333334L801.31640625,254.875" id="edge5232" class="relation dashed-line" marker-start="url(#extensionStart)"></path></svg></div>
<p> 通过策略模式使得架构清晰且符合开闭原则,我们可以很容易增加新的算法或修改原有算法。与此同时,该项目还很好地利用了其他项目的策略模式,从图中可以看到有一个新的类<code>BaseEstimator</code>,这个类与类<code>AutoSklearnComponents</code>的定义相关,但是通过查询它并不存在于本项目的开源代码中,通过vscode检索工具最终发现它出现在了sklearn源码的base模块,如果把类<code>BaseEstimator</code>也看作sklearn的一个接口,那么类<code>AutoSklearnComponents</code>相当于对sklearn中预测器(类<code>BaseEstimator</code>)的一种实现。</p>
<h3><a id="2__511"></a>2. 代理模式</h3>
<p> 代理模式的意图为为其他对象提供一种代理以控制对这个对象的访问,其典型的实现方法就是增加中间层,使得代理可以代替实体实现相关功能。<br>
通过前几节的分析,可以发现auto-sklearn的核心设计模式就是代理模式。最终要访问的实体类是<code>AutoML</code>,而类<code>AutoSklearnEstimator</code>相当于它的代理,这个类中并没有<code>fit()</code>方法真正的具体实现,但通过调用它我们却可以得到我们想要的功能和结果,这或许与传统意义上的代理模式略有不同,但其核心思想是相通的。创建一个类<code>AutoML</code>的实例需要比较大的开销,所以这里先创建一个消耗相对较小的对象来表示,真实对象只在需要时才会被真正创建。 这应该属于虚拟代理。</p>
<h1><a id="__515"></a>五. 结语</h1>
<p> 所有的分析到这里就结束了,作为一个面向对象编程领域的小白,一个学期下来收获很多,在报告中提出了一些自己不成熟的见解,感谢各位读者的耐心阅读和体谅,有机会也希望与大家共同交流学习~</p>
</div>
</div>
</body>
</html>