Skip to content

Instantly share code, notes, and snippets.

View vanbrands's full-sized avatar

Felipe Brandão vanbrands

View GitHub Profile
from sklearn.preprocessing import KBinsDiscretizer
from sklearn.model_selection import RandomizedSearchCV
search_space = {
'preprocessing__binfeatures__n_bins': [10, 20],
'model__n_estimators': [500, 1000, 2000],
'model__class_weight': ['balanced', 'balanced_subsample']
}
preprocessing = ColumnTransformer(transformers=[