[scikit-learn] Imblearn: SMOTENC
hamidizade.s at gmail.com
Sun Jan 20 12:01:21 EST 2019
I would greatly appreciate if you could let me know how to use SMOTENC. I
num_indices1 = list(X.iloc[:,np.r_[0:94,95,97,100:123]].columns.values)
cat_indices1 = list(X.iloc[:,np.r_[94,96,98,99,123:160]].columns.values)
# Categorical features
('feature_processing', FeatureUnion(transformer_list = [
('numeric', Pipeline(steps = [
Therefore, as it is indicated I have 5 categorical features. Really,
indices 123 to 160 are related to one categorical feature with 37 possible
values which is converted into 37 columns using get_dummies.
Sorry, I think SMOTENC should be inserted before the classifier ('clf',
reg) but I don't know how to define "categorical_features" in SMOTENC.
Besides, could you please let me know where to use imblearn.pipeline?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scikit-learn