Skip to content

Commit 1dc45b3

Browse files
author
Github Actions
committed
nabenabe0928: [feat] Add coalescer (#376)
1 parent cddf25e commit 1dc45b3

33 files changed

+355
-355
lines changed
Binary file not shown.
Binary file not shown.
Loading
Loading
Loading
Loading

development/_modules/autoPyTorch/pipeline/tabular_classification.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ <h1>Source code for autoPyTorch.pipeline.tabular_classification</h1><div class="
132132
<span class="kn">from</span> <span class="nn">autoPyTorch.pipeline.components.preprocessing.tabular_preprocessing.TabularColumnTransformer</span> <span class="kn">import</span> <span class="p">(</span>
133133
<span class="n">TabularColumnTransformer</span>
134134
<span class="p">)</span>
135+
<span class="kn">from</span> <span class="nn">autoPyTorch.pipeline.components.preprocessing.tabular_preprocessing.coalescer</span> <span class="kn">import</span> <span class="p">(</span>
136+
<span class="n">CoalescerChoice</span>
137+
<span class="p">)</span>
135138
<span class="kn">from</span> <span class="nn">autoPyTorch.pipeline.components.preprocessing.tabular_preprocessing.encoding</span> <span class="kn">import</span> <span class="p">(</span>
136139
<span class="n">EncoderChoice</span>
137140
<span class="p">)</span>
@@ -423,6 +426,7 @@ <h1>Source code for autoPyTorch.pipeline.tabular_classification</h1><div class="
423426
<span class="n">steps</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span>
424427
<span class="p">(</span><span class="s2">&quot;imputer&quot;</span><span class="p">,</span> <span class="n">SimpleImputer</span><span class="p">(</span><span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
425428
<span class="p">(</span><span class="s2">&quot;variance_threshold&quot;</span><span class="p">,</span> <span class="n">VarianceThreshold</span><span class="p">(</span><span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
429+
<span class="p">(</span><span class="s2">&quot;coalescer&quot;</span><span class="p">,</span> <span class="n">CoalescerChoice</span><span class="p">(</span><span class="n">default_dataset_properties</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
426430
<span class="p">(</span><span class="s2">&quot;encoder&quot;</span><span class="p">,</span> <span class="n">EncoderChoice</span><span class="p">(</span><span class="n">default_dataset_properties</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
427431
<span class="p">(</span><span class="s2">&quot;scaler&quot;</span><span class="p">,</span> <span class="n">ScalerChoice</span><span class="p">(</span><span class="n">default_dataset_properties</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
428432
<span class="p">(</span><span class="s2">&quot;feature_preprocessor&quot;</span><span class="p">,</span> <span class="n">FeatureProprocessorChoice</span><span class="p">(</span><span class="n">default_dataset_properties</span><span class="p">,</span>

development/_modules/autoPyTorch/pipeline/tabular_regression.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ <h1>Source code for autoPyTorch.pipeline.tabular_regression</h1><div class="high
132132
<span class="kn">from</span> <span class="nn">autoPyTorch.pipeline.components.preprocessing.tabular_preprocessing.TabularColumnTransformer</span> <span class="kn">import</span> <span class="p">(</span>
133133
<span class="n">TabularColumnTransformer</span>
134134
<span class="p">)</span>
135+
<span class="kn">from</span> <span class="nn">autoPyTorch.pipeline.components.preprocessing.tabular_preprocessing.coalescer</span> <span class="kn">import</span> <span class="p">(</span>
136+
<span class="n">CoalescerChoice</span>
137+
<span class="p">)</span>
135138
<span class="kn">from</span> <span class="nn">autoPyTorch.pipeline.components.preprocessing.tabular_preprocessing.encoding</span> <span class="kn">import</span> <span class="p">(</span>
136139
<span class="n">EncoderChoice</span>
137140
<span class="p">)</span>
@@ -373,6 +376,7 @@ <h1>Source code for autoPyTorch.pipeline.tabular_regression</h1><div class="high
373376
<span class="n">steps</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span>
374377
<span class="p">(</span><span class="s2">&quot;imputer&quot;</span><span class="p">,</span> <span class="n">SimpleImputer</span><span class="p">(</span><span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
375378
<span class="p">(</span><span class="s2">&quot;variance_threshold&quot;</span><span class="p">,</span> <span class="n">VarianceThreshold</span><span class="p">(</span><span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
379+
<span class="p">(</span><span class="s2">&quot;coalescer&quot;</span><span class="p">,</span> <span class="n">CoalescerChoice</span><span class="p">(</span><span class="n">default_dataset_properties</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
376380
<span class="p">(</span><span class="s2">&quot;encoder&quot;</span><span class="p">,</span> <span class="n">EncoderChoice</span><span class="p">(</span><span class="n">default_dataset_properties</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
377381
<span class="p">(</span><span class="s2">&quot;scaler&quot;</span><span class="p">,</span> <span class="n">ScalerChoice</span><span class="p">(</span><span class="n">default_dataset_properties</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">random_state</span><span class="p">)),</span>
378382
<span class="p">(</span><span class="s2">&quot;feature_preprocessor&quot;</span><span class="p">,</span> <span class="n">FeatureProprocessorChoice</span><span class="p">(</span><span class="n">default_dataset_properties</span><span class="p">,</span>

development/_sources/examples/20_basics/example_image_classification.rst.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,15 @@ Image Classification
8787
Configuration(values={
8888
'image_augmenter:GaussianBlur:use_augmenter': False,
8989
'image_augmenter:GaussianNoise:use_augmenter': False,
90-
'image_augmenter:RandomAffine:rotate': 341,
91-
'image_augmenter:RandomAffine:scale_offset': 0.395298372732557,
92-
'image_augmenter:RandomAffine:shear': 23,
93-
'image_augmenter:RandomAffine:translate_percent_offset': 0.30691858738922473,
90+
'image_augmenter:RandomAffine:rotate': 242,
91+
'image_augmenter:RandomAffine:scale_offset': 0.33257410970986145,
92+
'image_augmenter:RandomAffine:shear': 9,
93+
'image_augmenter:RandomAffine:translate_percent_offset': 0.08322219618477589,
9494
'image_augmenter:RandomAffine:use_augmenter': True,
95-
'image_augmenter:RandomCutout:use_augmenter': False,
95+
'image_augmenter:RandomCutout:p': 0.5931559928447478,
96+
'image_augmenter:RandomCutout:use_augmenter': True,
9697
'image_augmenter:Resize:use_augmenter': True,
97-
'image_augmenter:ZeroPadAndCrop:percent': 0.1233844931832313,
98+
'image_augmenter:ZeroPadAndCrop:percent': 0.04133682475059958,
9899
'normalizer:__choice__': 'NoNormalizer',
99100
})
100101

@@ -175,7 +176,7 @@ Image Classification
175176
176177
.. rst-class:: sphx-glr-timing
177178

178-
**Total running time of the script:** ( 0 minutes 5.581 seconds)
179+
**Total running time of the script:** ( 0 minutes 7.050 seconds)
179180

180181

181182
.. _sphx_glr_download_examples_20_basics_example_image_classification.py:

development/_sources/examples/20_basics/example_tabular_classification.rst.txt

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Search for an ensemble of machine learning algorithms
134134
.. code-block:: none
135135
136136
137-
<autoPyTorch.api.tabular_classification.TabularClassificationTask object at 0x7f6d20d85100>
137+
<autoPyTorch.api.tabular_classification.TabularClassificationTask object at 0x7f9cc997aeb0>
138138
139139
140140
@@ -165,30 +165,25 @@ Print the final ensemble performance
165165

166166
.. code-block:: none
167167
168-
{'accuracy': 0.8497109826589595}
169-
| | Preprocessing | Estimator | Weight |
170-
|---:|:-------------------------------------------------------------------------------------|:-------------------------------------------------------------------|---------:|
171-
| 0 | SimpleImputer,Variance Threshold,NoEncoder,MinMaxScaler,Nystroem | no embedding,ResNetBackbone,FullyConnectedHead,nn.Sequential | 0.18 |
172-
| 1 | SimpleImputer,Variance Threshold,NoEncoder,NoScaler,KitchenSink | no embedding,MLPBackbone,FullyConnectedHead,nn.Sequential | 0.16 |
173-
| 2 | SimpleImputer,Variance Threshold,NoEncoder,NoScaler,KitchenSink | no embedding,MLPBackbone,FullyConnectedHead,nn.Sequential | 0.12 |
174-
| 3 | None | CBLearner | 0.12 |
175-
| 4 | None | SVMLearner | 0.1 |
176-
| 5 | None | RFLearner | 0.06 |
177-
| 6 | None | KNNLearner | 0.06 |
178-
| 7 | SimpleImputer,Variance Threshold,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | no embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.06 |
179-
| 8 | SimpleImputer,Variance Threshold,NoEncoder,StandardScaler,PolynomialFeatures | no embedding,ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.04 |
180-
| 9 | None | LGBMLearner | 0.04 |
181-
| 10 | SimpleImputer,Variance Threshold,OneHotEncoder,RobustScaler,KernelPCA | no embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
182-
| 11 | SimpleImputer,Variance Threshold,OneHotEncoder,QuantileTransformer,KitchenSink | embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
183-
| 12 | None | ETLearner | 0.02 |
168+
{'accuracy': 0.861271676300578}
169+
| | Preprocessing | Estimator | Weight |
170+
|---:|:-------------------------------------------------------------------------------------------------|:----------------------------------------------------------------|---------:|
171+
| 0 | None | CBLearner | 0.66 |
172+
| 1 | SimpleImputer,Variance Threshold,NoCoalescer,NoEncoder,StandardScaler,TruncSVD | no embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.16 |
173+
| 2 | SimpleImputer,Variance Threshold,MinorityCoalescer,OneHotEncoder,StandardScaler,KernelPCA | embedding,ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.06 |
174+
| 3 | SimpleImputer,Variance Threshold,MinorityCoalescer,OneHotEncoder,Normalizer,Nystroem | no embedding,ResNetBackbone,FullyConnectedHead,nn.Sequential | 0.04 |
175+
| 4 | SimpleImputer,Variance Threshold,NoCoalescer,OneHotEncoder,Normalizer,TruncSVD | embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
176+
| 5 | SimpleImputer,Variance Threshold,MinorityCoalescer,OneHotEncoder,StandardScaler,KernelPCA | embedding,ShapedResNetBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
177+
| 6 | None | RFLearner | 0.02 |
178+
| 7 | SimpleImputer,Variance Threshold,NoCoalescer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | no embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.02 |
184179
autoPyTorch results:
185180
Dataset name: Australian
186181
Optimisation Metric: accuracy
187182
Best validation score: 0.8713450292397661
188183
Number of target algorithm runs: 24
189-
Number of successful target algorithm runs: 22
190-
Number of crashed target algorithm runs: 0
191-
Number of target algorithms that exceeded the time limit: 2
184+
Number of successful target algorithm runs: 21
185+
Number of crashed target algorithm runs: 2
186+
Number of target algorithms that exceeded the time limit: 1
192187
Number of target algorithms that exceeded the memory limit: 0
193188
194189
@@ -198,7 +193,7 @@ Print the final ensemble performance
198193
199194
.. rst-class:: sphx-glr-timing
200195

201-
**Total running time of the script:** ( 5 minutes 26.257 seconds)
196+
**Total running time of the script:** ( 5 minutes 18.469 seconds)
202197

203198

204199
.. _sphx_glr_download_examples_20_basics_example_tabular_classification.py:

development/_sources/examples/20_basics/example_tabular_regression.rst.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Search for an ensemble of machine learning algorithms
125125
.. code-block:: none
126126
127127
128-
<autoPyTorch.api.tabular_regression.TabularRegressionTask object at 0x7f6dbb9bcd90>
128+
<autoPyTorch.api.tabular_regression.TabularRegressionTask object at 0x7f9d6473cd90>
129129
130130
131131
@@ -160,20 +160,20 @@ Print the final ensemble performance
160160
.. code-block:: none
161161
162162
{'r2': 0.9407884171054208}
163-
| | Preprocessing | Estimator | Weight |
164-
|---:|:-------------------------------------------------------------------------------------|:----------------------------------------------------------------|---------:|
165-
| 0 | None | CBLearner | 0.44 |
166-
| 1 | SimpleImputer,Variance Threshold,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | no embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.42 |
167-
| 2 | SimpleImputer,Variance Threshold,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | no embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.1 |
168-
| 3 | None | LGBMLearner | 0.04 |
163+
| | Preprocessing | Estimator | Weight |
164+
|---:|:-------------------------------------------------------------------------------------------------|:----------------------------------------------------------------|---------:|
165+
| 0 | None | CBLearner | 0.44 |
166+
| 1 | SimpleImputer,Variance Threshold,NoCoalescer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | no embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.42 |
167+
| 2 | SimpleImputer,Variance Threshold,NoCoalescer,OneHotEncoder,StandardScaler,NoFeaturePreprocessing | no embedding,ShapedMLPBackbone,FullyConnectedHead,nn.Sequential | 0.1 |
168+
| 3 | None | LGBMLearner | 0.04 |
169169
autoPyTorch results:
170-
Dataset name: 9c684c0d-89ce-11ec-8818-a1cc4bcb5e23
170+
Dataset name: 81eeee0e-89dc-11ec-87d7-1970926e9c95
171171
Optimisation Metric: r2
172172
Best validation score: 0.8670098636440993
173-
Number of target algorithm runs: 29
174-
Number of successful target algorithm runs: 29
175-
Number of crashed target algorithm runs: 0
176-
Number of target algorithms that exceeded the time limit: 0
173+
Number of target algorithm runs: 28
174+
Number of successful target algorithm runs: 25
175+
Number of crashed target algorithm runs: 1
176+
Number of target algorithms that exceeded the time limit: 2
177177
Number of target algorithms that exceeded the memory limit: 0
178178
179179
@@ -183,7 +183,7 @@ Print the final ensemble performance
183183
184184
.. rst-class:: sphx-glr-timing
185185

186-
**Total running time of the script:** ( 5 minutes 30.478 seconds)
186+
**Total running time of the script:** ( 5 minutes 26.883 seconds)
187187

188188

189189
.. _sphx_glr_download_examples_20_basics_example_tabular_regression.py:

development/_sources/examples/20_basics/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-
**11:02.317** total execution time for **examples_20_basics** files:
8+
**10:52.402** total execution time for **examples_20_basics** files:
99

1010
+--------------------------------------------------------------------------------------------------------------+-----------+--------+
11-
| :ref:`sphx_glr_examples_20_basics_example_tabular_regression.py` (``example_tabular_regression.py``) | 05:30.478 | 0.0 MB |
11+
| :ref:`sphx_glr_examples_20_basics_example_tabular_regression.py` (``example_tabular_regression.py``) | 05:26.883 | 0.0 MB |
1212
+--------------------------------------------------------------------------------------------------------------+-----------+--------+
13-
| :ref:`sphx_glr_examples_20_basics_example_tabular_classification.py` (``example_tabular_classification.py``) | 05:26.257 | 0.0 MB |
13+
| :ref:`sphx_glr_examples_20_basics_example_tabular_classification.py` (``example_tabular_classification.py``) | 05:18.469 | 0.0 MB |
1414
+--------------------------------------------------------------------------------------------------------------+-----------+--------+
15-
| :ref:`sphx_glr_examples_20_basics_example_image_classification.py` (``example_image_classification.py``) | 00:05.581 | 0.0 MB |
15+
| :ref:`sphx_glr_examples_20_basics_example_image_classification.py` (``example_image_classification.py``) | 00:07.050 | 0.0 MB |
1616
+--------------------------------------------------------------------------------------------------------------+-----------+--------+

0 commit comments

Comments
 (0)