Nishant Padhee
Nishant Padhee

Reputation: 51

TypeError in imblearn pipeline: type 'Pipeline' is not subscriptable

transform = [("ord", OrdinalEncoder(), ['job', 'education']),
             ("ohe", OneHotEncoder(), ['contact', 'month', 'poutcome'])]

ct = ColumnTransformer(transform, remainder='passthrough')

p = imbpipeline[('ct', ct),
                ('scaler', StandardScaler()),
                ('smote', SMOTE(random_state=0)),
                ('xgb', XGBClassifier())]

While trying to run the above I am getting error

"TypeError: type 'Pipeline' is not subscriptable"

Upvotes: 0

Views: 46

Answers (0)

Related Questions