@@ -128,9 +128,10 @@ define([
128
128
'prep-onehot' : {
129
129
name : 'OneHotEncoder' ,
130
130
import : 'from sklearn.preprocessing import OneHotEncoder' ,
131
- code : 'OneHotEncoder()' ,
131
+ code : 'OneHotEncoder(${handle_unknown}${etc} )' ,
132
132
options : [
133
-
133
+ { name : 'handle_unknown' , component : [ 'option_suggest' ] , usePair : true ,
134
+ options : [ 'error' , 'ignore' ] , default : 'error' } ,
134
135
]
135
136
} ,
136
137
'prep-label' : {
@@ -144,74 +145,85 @@ define([
144
145
'prep-ordinal' : {
145
146
name : 'OrdinalEncoder' ,
146
147
import : 'from sklearn.preprocessing import OrdinalEncoder' ,
147
- code : 'OrdinalEncoder()' ,
148
+ code : 'OrdinalEncoder(${handle_unknown}${unknown_values}${etc} )' ,
148
149
options : [
149
-
150
+ { name : 'handle_unknown' , component : [ 'option_suggest' ] , usePair : true ,
151
+ options : [ 'error' , 'use_encoded_value' ] , default : 'error' } ,
152
+ { name : 'unknown_values' , component : [ 'input' ] , usePair : true }
150
153
]
151
154
} ,
152
155
'prep-target' : {
153
156
name : 'TargetEncoder' ,
154
157
install : '!pip install category_encoders' ,
155
158
import : 'from category_encoders.target_encoder import TargetEncoder' ,
156
- code : 'TargetEncoder()' ,
159
+ code : 'TargetEncoder(${cols}${handle_missing}${handle_unknown}${smoothing}${etc} )' ,
157
160
options : [
158
-
161
+ { name : 'cols' , component : [ 'var_suggest' , '1darr' ] , usePair : true } ,
162
+ { name : 'handle_missing' , component : [ 'option_suggest' ] , usePair : true ,
163
+ options : [ 'error' , 'return_nan' , 'value' ] , default : 'value' } ,
164
+ { name : 'handle_unknown' , component : [ 'option_suggest' ] , usePair : true ,
165
+ options : [ 'error' , 'return_nan' , 'value' ] , default : 'value' } ,
166
+ { name : 'smoothing' , component : [ 'input_number' ] , default : 1.0 , usePair : true }
159
167
]
160
168
} ,
161
169
'prep-smote' : {
162
170
name : 'SMOTE' ,
163
171
install : '!pip install imblearn' ,
164
- import : 'from imlearn .over_sampling import SMOTE' ,
165
- code : 'SMOTE()' ,
172
+ import : 'from imblearn .over_sampling import SMOTE' ,
173
+ code : 'SMOTE(${random_state}${k_neighbors}${etc} )' ,
166
174
options : [
167
-
175
+ { name : 'random_state' , component : [ 'input_number' ] , placeholder : '123' , usePair : true } ,
176
+ { name : 'k_neighbors' , component : [ 'input_number' ] , default : 5 , usePair : true }
168
177
]
169
178
} ,
170
179
/** Data Preparation - Scaling */
171
180
'prep-standard' : {
172
181
name : 'StandardScaler' ,
173
182
import : 'from sklearn.preprocessing import StandardScaler' ,
174
- code : 'StandardScaler()' ,
183
+ code : 'StandardScaler(${with_mean}${with_std}${etc} )' ,
175
184
options : [
176
-
185
+ { name : 'with_mean' , component : [ 'bool_select' ] , default : 'True' , usePair : true } ,
186
+ { name : 'with_std' , component : [ 'bool_select' ] , default : 'True' , usePair : true }
177
187
]
178
188
} ,
179
189
'prep-robust' : {
180
190
name : 'RobustScaler' ,
181
191
import : 'from sklearn.preprocessing import RobustScaler' ,
182
- code : 'RobustScaler()' ,
192
+ code : 'RobustScaler(${with_centering}${with_scaling}${etc} )' ,
183
193
options : [
184
-
194
+ { name : 'with_centering' , component : [ 'bool_select' ] , default : 'True' , usePair : true } ,
195
+ { name : 'with_scaling' , component : [ 'bool_select' ] , default : 'True' , usePair : true }
185
196
]
186
197
} ,
187
198
'prep-minmax' : {
188
199
name : 'MinMaxScaler' ,
189
200
import : 'from sklearn.preprocessing import MinMaxScaler' ,
190
- code : 'MinMaxScaler()' ,
201
+ code : 'MinMaxScaler(${feature_range}${etc} )' ,
191
202
options : [
192
-
203
+ { name : 'feature_range' , component : [ 'input' ] , placeholder : '(min, max)' , default : '(0, 1)' , usePair : true }
193
204
]
194
205
} ,
195
206
'prep-normalizer' : {
196
207
name : 'Normalizer' ,
197
208
import : 'from sklearn.preprocessing import Normalizer' ,
198
- code : 'Normalizer()' ,
209
+ code : 'Normalizer(${norm}${etc} )' ,
199
210
options : [
200
-
211
+ { name : 'norm' , component : [ 'option_suggest' ] , usePair : true ,
212
+ options : [ 'l1' , 'l2' , 'max' ] , default : 'l2' } ,
201
213
]
202
214
} ,
203
215
'prep-func-trsfrm-log' : {
204
216
name : 'Log Scaling' ,
205
217
import : 'from sklearn.preprocessing import FunctionTransformer' ,
206
- code : 'FunctionTransformer(np.log1p)' ,
218
+ code : 'FunctionTransformer(np.log1p${etc} )' ,
207
219
options : [
208
220
209
221
]
210
222
} ,
211
223
'prep-func-trsfrm-exp' : {
212
224
name : 'Exponential Scaling' ,
213
225
import : 'from sklearn.preprocessing import FunctionTransformer' ,
214
- code : 'FunctionTransformer(np.expm1)' ,
226
+ code : 'FunctionTransformer(np.expm1${etc} )' ,
215
227
options : [
216
228
217
229
]
@@ -220,7 +232,7 @@ define([
220
232
'ln-rgs' : {
221
233
name : 'LinearRegression' ,
222
234
import : 'from sklearn.linear_model import LinearRegression' ,
223
- code : 'LinearRegression(${fit_intercept})' ,
235
+ code : 'LinearRegression(${fit_intercept}${etc} )' ,
224
236
options : [
225
237
{ name : 'fit_intercept' , component : [ 'bool_select' ] , default : 'True' , usePair : true }
226
238
]
@@ -429,8 +441,19 @@ define([
429
441
]
430
442
} ,
431
443
/** Auto ML */
444
+ 'auto-sklearn-rgs' : {
445
+ name : 'AutoSklearnRegressor (Linux only)' ,
446
+ install : 'pip install auto-sklearn' ,
447
+ import : 'from autosklearn import AutoSklearnRegressor' ,
448
+ link : 'https://automl.github.io/auto-sklearn/master/api.html#regression' ,
449
+ code : 'AutoSklearnRegressor(${etc})' ,
450
+ options : [
451
+
452
+ ]
453
+ } ,
432
454
'tpot-rgs' : {
433
455
name : 'TPOTRegressor' ,
456
+ install : 'pip install tpot' ,
434
457
import : 'from tpot import TPOTRegressor' ,
435
458
code : 'TPOTRegressor(${generation}${population_size}${cv}${random_state}${etc})' ,
436
459
options : [
@@ -440,8 +463,19 @@ define([
440
463
{ name : 'random_state' , component : [ 'input_number' ] , placeholder : '123' , usePair : true }
441
464
]
442
465
} ,
466
+ 'auto-sklearn-clf' : {
467
+ name : 'AutoSklearnClassifier (Linux only)' ,
468
+ install : 'pip install auto-sklearn' ,
469
+ import : 'from autosklearn import AutoSklearnClassifier' ,
470
+ link : 'https://automl.github.io/auto-sklearn/master/api.html#classification' ,
471
+ code : 'AutoSklearnClassifier(${etc})' ,
472
+ options : [
473
+
474
+ ]
475
+ } ,
443
476
'tpot-clf' : {
444
477
name : 'TPOTClassifier' ,
478
+ install : 'pip install tpot' ,
445
479
import : 'from tpot import TPOTClassifier' ,
446
480
code : 'TPOTClassifier(${generation}${population_size}${cv}${random_state}${etc})' ,
447
481
options : [
0 commit comments