You mentioned my previous question here.
I just faced the same issue as you on Colab. It is 100% issue with libraries.
Initially, I got the error for SMOTE
:
- `AttributeError: 'SMOTE' object has no attribute '_validate_data'
After installing/reinstalling libraries I got exactly your error.
How did I resolve it?
- Started to run Colab and imported all common libraries (
pd
, np
, scikit
, etc).
- Installed PyCaret via
pip install
. Then import pycaret
and from pycaret.classification import *
- Colab reacted: you have issues with
scipy
, sklearn
, lightgbm
, please restart your runtime.
- Restarted my runtime on Colab
- Imported all libraries again as I did in step 1
- Ran
import pycaret
and from pycaret.classification import *
only
My final code:
# Initialize the setup with SMOTE
clf_smote = setup(
data,
session_id = 123,
target = 'Target',
remove_multicollinearity = True,
multicollinearity_threshold = 0.95,
fix_imbalance = True
)
I did not use imputation_type='iterative'
as in my question above.
Proof of running:

It worked, but it was my solution. Would be great to have a more detailed guide on how to deal with such issues, using this amazing library.