Skip to content

Commit 2cd927b

Browse files
author
Github Actions
committed
Ravin Kohli: handle nans in categorical columns (#118)
1 parent ea6d567 commit 2cd927b

File tree

11 files changed

+73
-69
lines changed

11 files changed

+73
-69
lines changed
Binary file not shown.
Binary file not shown.

refactor_development/_sources/examples/example_image_classification.rst.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,19 @@ Image Classification
7777
Pipeline Random Config:
7878
________________________________________
7979
Configuration:
80-
image_augmenter:GaussianBlur:sigma_min, Value: 0.8480354370981031
81-
image_augmenter:GaussianBlur:sigma_offset, Value: 1.8662941407999276
80+
image_augmenter:GaussianBlur:sigma_min, Value: 1.0710079708867957
81+
image_augmenter:GaussianBlur:sigma_offset, Value: 0.5426415121176082
8282
image_augmenter:GaussianBlur:use_augmenter, Value: True
83-
image_augmenter:GaussianNoise:use_augmenter, Value: False
84-
image_augmenter:RandomAffine:use_augmenter, Value: False
85-
image_augmenter:RandomCutout:p, Value: 0.3656551312711466
86-
image_augmenter:RandomCutout:use_augmenter, Value: True
87-
image_augmenter:Resize:use_augmenter, Value: False
88-
image_augmenter:ZeroPadAndCrop:percent, Value: 0.4929042351991033
83+
image_augmenter:GaussianNoise:sigma_offset, Value: 1.40212397459401
84+
image_augmenter:GaussianNoise:use_augmenter, Value: True
85+
image_augmenter:RandomAffine:rotate, Value: 281
86+
image_augmenter:RandomAffine:scale_offset, Value: 0.042566838354111396
87+
image_augmenter:RandomAffine:shear, Value: 6
88+
image_augmenter:RandomAffine:translate_percent_offset, Value: 0.06401515304310679
89+
image_augmenter:RandomAffine:use_augmenter, Value: True
90+
image_augmenter:RandomCutout:use_augmenter, Value: False
91+
image_augmenter:Resize:use_augmenter, Value: True
92+
image_augmenter:ZeroPadAndCrop:percent, Value: 0.45960159661876177
8993
normalizer:__choice__, Value: 'NoNormalizer'
9094

9195
Fitting the pipeline...
@@ -165,7 +169,7 @@ Image Classification
165169
166170
.. rst-class:: sphx-glr-timing
167171

168-
**Total running time of the script:** ( 0 minutes 8.334 seconds)
172+
**Total running time of the script:** ( 0 minutes 6.047 seconds)
169173

170174

171175
.. _sphx_glr_download_examples_example_image_classification.py:

refactor_development/_sources/examples/example_tabular_classification.rst.txt

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ with AutoPyTorch
3636

3737
.. code-block:: none
3838
39-
<smac.runhistory.runhistory.RunHistory object at 0x7f66907c4640> [TrajEntry(train_perf=2147483648, incumbent_id=1, incumbent=Configuration:
39+
<smac.runhistory.runhistory.RunHistory object at 0x7fec89f16190> [TrajEntry(train_perf=2147483648, incumbent_id=1, incumbent=Configuration:
4040
data_loader:batch_size, Value: 32
4141
encoder:__choice__, Value: 'OneHotEncoder'
4242
feature_preprocessor:__choice__, Value: 'NoFeaturePreprocessor'
@@ -67,7 +67,7 @@ with AutoPyTorch
6767
scaler:__choice__, Value: 'StandardScaler'
6868
trainer:StandardTrainer:weighted_loss, Value: True
6969
trainer:__choice__, Value: 'StandardTrainer'
70-
, ta_runs=0, ta_time_used=0.0, wallclock_time=0.002040863037109375, budget=0), TrajEntry(train_perf=0.14619883040935677, incumbent_id=1, incumbent=Configuration:
70+
, ta_runs=0, ta_time_used=0.0, wallclock_time=0.0020265579223632812, budget=0), TrajEntry(train_perf=0.1871345029239766, incumbent_id=1, incumbent=Configuration:
7171
data_loader:batch_size, Value: 32
7272
encoder:__choice__, Value: 'OneHotEncoder'
7373
feature_preprocessor:__choice__, Value: 'NoFeaturePreprocessor'
@@ -98,21 +98,19 @@ with AutoPyTorch
9898
scaler:__choice__, Value: 'StandardScaler'
9999
trainer:StandardTrainer:weighted_loss, Value: True
100100
trainer:__choice__, Value: 'StandardTrainer'
101-
, ta_runs=1, ta_time_used=4.407814264297485, wallclock_time=5.844383239746094, budget=5.555555555555555)]
102-
{'accuracy': 0.861271676300578}
101+
, ta_runs=1, ta_time_used=5.460636854171753, wallclock_time=6.8977086544036865, budget=5.555555555555555)]
102+
{'accuracy': 0.8728323699421965}
103103
| | Preprocessing | Estimator | Weight |
104104
|---:|:------------------------------------------------------------------|:------------------------------------------------------|---------:|
105-
| 0 | None | RFClassifier | 0.26 |
106-
| 1 | None | ExtraTreesClassifier | 0.22 |
107-
| 2 | SimpleImputer,OrdinalEncoder,NoScaler,Nystroem | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.14 |
108-
| 3 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.14 |
109-
| 4 | SimpleImputer,OrdinalEncoder,Normalizer,PowerTransformer | MLPBackbone,FullyConnectedHead,nn.Sequential | 0.06 |
110-
| 5 | None | SVC | 0.06 |
111-
| 6 | None | KNNClassifier | 0.04 |
112-
| 7 | SimpleImputer,OrdinalEncoder,Normalizer,PowerTransformer | MLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
113-
| 8 | SimpleImputer,OrdinalEncoder,MinMaxScaler,KitchenSink | ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
114-
| 9 | SimpleImputer,OrdinalEncoder,MinMaxScaler,KitchenSink | ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
115-
| 10 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
105+
| 0 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.22 |
106+
| 1 | SimpleImputer,OrdinalEncoder,Normalizer,PowerTransformer | MLPBackbone,FullyConnectedHead,nn.Sequential | 0.2 |
107+
| 2 | SimpleImputer,OrdinalEncoder,NoScaler,Nystroem | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.2 |
108+
| 3 | None | RFClassifier | 0.14 |
109+
| 4 | None | ExtraTreesClassifier | 0.1 |
110+
| 5 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.06 |
111+
| 6 | SimpleImputer,OneHotEncoder,MinMaxScaler,PowerTransformer | ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.04 |
112+
| 7 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
113+
| 8 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
116114
117115
118116
@@ -204,7 +202,7 @@ with AutoPyTorch
204202
205203
.. rst-class:: sphx-glr-timing
206204

207-
**Total running time of the script:** ( 9 minutes 9.069 seconds)
205+
**Total running time of the script:** ( 9 minutes 26.880 seconds)
208206

209207

210208
.. _sphx_glr_download_examples_example_tabular_classification.py:

refactor_development/_sources/examples/example_tabular_regression.rst.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ with AutoPyTorch
3636

3737
.. code-block:: none
3838
39-
<smac.runhistory.runhistory.RunHistory object at 0x7f66821e6b50> [TrajEntry(train_perf=2147483648, incumbent_id=1, incumbent=Configuration:
39+
<smac.runhistory.runhistory.RunHistory object at 0x7fec729332b0> [TrajEntry(train_perf=2147483648, incumbent_id=1, incumbent=Configuration:
4040
data_loader:batch_size, Value: 32
4141
encoder:__choice__, Value: 'NoEncoder'
4242
imputer:numerical_strategy, Value: 'mean'
@@ -64,7 +64,7 @@ with AutoPyTorch
6464
optimizer:__choice__, Value: 'AdamOptimizer'
6565
scaler:__choice__, Value: 'StandardScaler'
6666
trainer:__choice__, Value: 'StandardTrainer'
67-
, ta_runs=0, ta_time_used=0.0, wallclock_time=0.0017652511596679688, budget=0), TrajEntry(train_perf=0.005070456150329972, incumbent_id=1, incumbent=Configuration:
67+
, ta_runs=0, ta_time_used=0.0, wallclock_time=0.0020189285278320312, budget=0), TrajEntry(train_perf=0.001744201612121854, incumbent_id=1, incumbent=Configuration:
6868
data_loader:batch_size, Value: 32
6969
encoder:__choice__, Value: 'NoEncoder'
7070
imputer:numerical_strategy, Value: 'mean'
@@ -92,8 +92,8 @@ with AutoPyTorch
9292
optimizer:__choice__, Value: 'AdamOptimizer'
9393
scaler:__choice__, Value: 'StandardScaler'
9494
trainer:__choice__, Value: 'StandardTrainer'
95-
, ta_runs=1, ta_time_used=7.408640384674072, wallclock_time=10.797286748886108, budget=5.555555555555555)]
96-
{'r2': 0.9996077661516851}
95+
, ta_runs=1, ta_time_used=9.655506134033203, wallclock_time=13.354029893875122, budget=5.555555555555555)]
96+
{'r2': 0.999559711239828}
9797
9898
9999
@@ -216,7 +216,7 @@ with AutoPyTorch
216216
217217
.. rst-class:: sphx-glr-timing
218218

219-
**Total running time of the script:** ( 8 minutes 28.738 seconds)
219+
**Total running time of the script:** ( 8 minutes 38.433 seconds)
220220

221221

222222
.. _sphx_glr_download_examples_example_tabular_regression.py:

refactor_development/_sources/examples/sg_execution_times.rst.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
Computation times
77
=================
8-
**17:46.141** total execution time for **examples** files:
8+
**18:11.360** total execution time for **examples** files:
99

1010
+----------------------------------------------------------------------------------------------------+-----------+--------+
11-
| :ref:`sphx_glr_examples_example_tabular_classification.py` (``example_tabular_classification.py``) | 09:09.069 | 0.0 MB |
11+
| :ref:`sphx_glr_examples_example_tabular_classification.py` (``example_tabular_classification.py``) | 09:26.880 | 0.0 MB |
1212
+----------------------------------------------------------------------------------------------------+-----------+--------+
13-
| :ref:`sphx_glr_examples_example_tabular_regression.py` (``example_tabular_regression.py``) | 08:28.738 | 0.0 MB |
13+
| :ref:`sphx_glr_examples_example_tabular_regression.py` (``example_tabular_regression.py``) | 08:38.433 | 0.0 MB |
1414
+----------------------------------------------------------------------------------------------------+-----------+--------+
15-
| :ref:`sphx_glr_examples_example_image_classification.py` (``example_image_classification.py``) | 00:08.334 | 0.0 MB |
15+
| :ref:`sphx_glr_examples_example_image_classification.py` (``example_image_classification.py``) | 00:06.047 | 0.0 MB |
1616
+----------------------------------------------------------------------------------------------------+-----------+--------+

refactor_development/examples/example_image_classification.html

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3939,15 +3939,19 @@
39393939
Pipeline Random Config:
39403940
________________________________________
39413941
Configuration:
3942-
image_augmenter:GaussianBlur:sigma_min, Value: 0.8480354370981031
3943-
image_augmenter:GaussianBlur:sigma_offset, Value: 1.8662941407999276
3942+
image_augmenter:GaussianBlur:sigma_min, Value: 1.0710079708867957
3943+
image_augmenter:GaussianBlur:sigma_offset, Value: 0.5426415121176082
39443944
image_augmenter:GaussianBlur:use_augmenter, Value: True
3945-
image_augmenter:GaussianNoise:use_augmenter, Value: False
3946-
image_augmenter:RandomAffine:use_augmenter, Value: False
3947-
image_augmenter:RandomCutout:p, Value: 0.3656551312711466
3948-
image_augmenter:RandomCutout:use_augmenter, Value: True
3949-
image_augmenter:Resize:use_augmenter, Value: False
3950-
image_augmenter:ZeroPadAndCrop:percent, Value: 0.4929042351991033
3945+
image_augmenter:GaussianNoise:sigma_offset, Value: 1.40212397459401
3946+
image_augmenter:GaussianNoise:use_augmenter, Value: True
3947+
image_augmenter:RandomAffine:rotate, Value: 281
3948+
image_augmenter:RandomAffine:scale_offset, Value: 0.042566838354111396
3949+
image_augmenter:RandomAffine:shear, Value: 6
3950+
image_augmenter:RandomAffine:translate_percent_offset, Value: 0.06401515304310679
3951+
image_augmenter:RandomAffine:use_augmenter, Value: True
3952+
image_augmenter:RandomCutout:use_augmenter, Value: False
3953+
image_augmenter:Resize:use_augmenter, Value: True
3954+
image_augmenter:ZeroPadAndCrop:percent, Value: 0.45960159661876177
39513955
normalizer:__choice__, Value: &#39;NoNormalizer&#39;
39523956

39533957
Fitting the pipeline...
@@ -4020,7 +4024,7 @@
40204024
<span class="nb">print</span><span class="p">(</span><span class="n">pipeline</span><span class="p">)</span>
40214025
</pre></div>
40224026
</div>
4023-
<p class="sphx-glr-timing"><strong>Total running time of the script:</strong> ( 0 minutes 8.334 seconds)</p>
4027+
<p class="sphx-glr-timing"><strong>Total running time of the script:</strong> ( 0 minutes 6.047 seconds)</p>
40244028
<div class="sphx-glr-footer class sphx-glr-footer-example docutils container" id="sphx-glr-download-examples-example-image-classification-py">
40254029
<div class="binder-badge docutils container">
40264030
<a class="reference external image-reference" href="https://mybinder.org/v2/gh/automl/Auto-PyTorch/refactor_development?urlpath=lab/tree/notebooks/examples/example_image_classification.ipynb"><img alt="Launch binder" src="../_images/binder_badge_logo.svg" width="150px" /></a>

refactor_development/examples/example_tabular_classification.html

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<p>The following example shows how to fit a sample classification model
123123
with AutoPyTorch</p>
124124
<p class="sphx-glr-script-out">Out:</p>
125-
<div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;smac.runhistory.runhistory.RunHistory object at 0x7f66907c4640&gt; [TrajEntry(train_perf=2147483648, incumbent_id=1, incumbent=Configuration:
125+
<div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;smac.runhistory.runhistory.RunHistory object at 0x7fec89f16190&gt; [TrajEntry(train_perf=2147483648, incumbent_id=1, incumbent=Configuration:
126126
data_loader:batch_size, Value: 32
127127
encoder:__choice__, Value: &#39;OneHotEncoder&#39;
128128
feature_preprocessor:__choice__, Value: &#39;NoFeaturePreprocessor&#39;
@@ -153,7 +153,7 @@
153153
scaler:__choice__, Value: &#39;StandardScaler&#39;
154154
trainer:StandardTrainer:weighted_loss, Value: True
155155
trainer:__choice__, Value: &#39;StandardTrainer&#39;
156-
, ta_runs=0, ta_time_used=0.0, wallclock_time=0.002040863037109375, budget=0), TrajEntry(train_perf=0.14619883040935677, incumbent_id=1, incumbent=Configuration:
156+
, ta_runs=0, ta_time_used=0.0, wallclock_time=0.0020265579223632812, budget=0), TrajEntry(train_perf=0.1871345029239766, incumbent_id=1, incumbent=Configuration:
157157
data_loader:batch_size, Value: 32
158158
encoder:__choice__, Value: &#39;OneHotEncoder&#39;
159159
feature_preprocessor:__choice__, Value: &#39;NoFeaturePreprocessor&#39;
@@ -184,21 +184,19 @@
184184
scaler:__choice__, Value: &#39;StandardScaler&#39;
185185
trainer:StandardTrainer:weighted_loss, Value: True
186186
trainer:__choice__, Value: &#39;StandardTrainer&#39;
187-
, ta_runs=1, ta_time_used=4.407814264297485, wallclock_time=5.844383239746094, budget=5.555555555555555)]
188-
{&#39;accuracy&#39;: 0.861271676300578}
187+
, ta_runs=1, ta_time_used=5.460636854171753, wallclock_time=6.8977086544036865, budget=5.555555555555555)]
188+
{&#39;accuracy&#39;: 0.8728323699421965}
189189
| | Preprocessing | Estimator | Weight |
190190
|---:|:------------------------------------------------------------------|:------------------------------------------------------|---------:|
191-
| 0 | None | RFClassifier | 0.26 |
192-
| 1 | None | ExtraTreesClassifier | 0.22 |
193-
| 2 | SimpleImputer,OrdinalEncoder,NoScaler,Nystroem | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.14 |
194-
| 3 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.14 |
195-
| 4 | SimpleImputer,OrdinalEncoder,Normalizer,PowerTransformer | MLPBackbone,FullyConnectedHead,nn.Sequential | 0.06 |
196-
| 5 | None | SVC | 0.06 |
197-
| 6 | None | KNNClassifier | 0.04 |
198-
| 7 | SimpleImputer,OrdinalEncoder,Normalizer,PowerTransformer | MLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
199-
| 8 | SimpleImputer,OrdinalEncoder,MinMaxScaler,KitchenSink | ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
200-
| 9 | SimpleImputer,OrdinalEncoder,MinMaxScaler,KitchenSink | ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
201-
| 10 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
191+
| 0 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.22 |
192+
| 1 | SimpleImputer,OrdinalEncoder,Normalizer,PowerTransformer | MLPBackbone,FullyConnectedHead,nn.Sequential | 0.2 |
193+
| 2 | SimpleImputer,OrdinalEncoder,NoScaler,Nystroem | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.2 |
194+
| 3 | None | RFClassifier | 0.14 |
195+
| 4 | None | ExtraTreesClassifier | 0.1 |
196+
| 5 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.06 |
197+
| 6 | SimpleImputer,OneHotEncoder,MinMaxScaler,PowerTransformer | ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.04 |
198+
| 7 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
199+
| 8 | SimpleImputer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
202200
</pre></div>
203201
</div>
204202
<div class="line-block">
@@ -283,7 +281,7 @@
283281
<span class="nb">print</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">show_models</span><span class="p">())</span>
284282
</pre></div>
285283
</div>
286-
<p class="sphx-glr-timing"><strong>Total running time of the script:</strong> ( 9 minutes 9.069 seconds)</p>
284+
<p class="sphx-glr-timing"><strong>Total running time of the script:</strong> ( 9 minutes 26.880 seconds)</p>
287285
<div class="sphx-glr-footer class sphx-glr-footer-example docutils container" id="sphx-glr-download-examples-example-tabular-classification-py">
288286
<div class="binder-badge docutils container">
289287
<a class="reference external image-reference" href="https://mybinder.org/v2/gh/automl/Auto-PyTorch/refactor_development?urlpath=lab/tree/notebooks/examples/example_tabular_classification.ipynb"><img alt="Launch binder" src="../_images/binder_badge_logo.svg" width="150px" /></a>

0 commit comments

Comments
 (0)