I am trying to create a model using pycaret just as:
from pycaret.classification import *
clf1 = setup(data = dt, target = 'group')
lr = create_model('lr')
Then I get:
AttributeError: 'Simple_Imputer' object has no attribute 'fill_value_categorical'
So, following here, I added:
clf1 = setup(data = dt, target = 'group', imputation_type='iterative' )
lr = create_model('lr')
Then I get:
AttributeError: 'Make_Time_Features' object has no attribute 'list_of_features'
My version of sklearn is 0.23.2 and pycaret is 2.3.2
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
:
After installing/reinstalling libraries I got exactly your error.
How did I resolve it?
pd
, np
, scikit
, etc).pip install
. Then import pycaret
and from pycaret.classification import *
scipy
, sklearn
, lightgbm
, please restart your runtime.import pycaret
and from pycaret.classification import *
onlyMy 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.