I'm trying to run the BayesSearchCV on a decision tree but i found this error.
TypeError: __init__() got an unexpected keyword argument 'iid'
from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier()
#hypertuning paramenters
parameter_grid = {
'criterion':['gini','entropy'],
'splitter':['best','random'],
'max_depth': [5, 8,10, 15, 25],
'min_samples_split' : [2, 5, 10, 15,20,25],
'min_samples_leaf' : [1, 2, 5, 10,15,20],
'random_state' : [seed],
}
print("TUNING ############################")
startgrid=time.time()
cv = RepeatedStratifiedKFold(n_splits=10, n_repeats=3, random_state=1)
grid_searchdt = FixedBayesSearchCV(estimator=clf, search_spaces=parameter_grid, n_jobs=-1, cv=cv,iid=False)
bestDT = grid_searchdt.fit(x_train, y_train)
print(bestDT.best_params_)
best_grid_dt = bestDT.best_estimator_
print(best_grid_dt)
endgrid = time.time()
print("Grid time: "+str(endgrid-startgrid))
with a simple dataset. Could you please help me? Thanks