Я пытаюсь использовать поиск в сетке, чтобы найти оптимальные параметры для дерева решений.
parameter_space = {'max_features': ['auto', 'sqrt', 'log2'],
'ccp_alpha': [np.array(pd.Series(np.arange(0,1,0.001)))]}
clf_tree = GridSearchCV(Dtree, parameter_space,cv=5)
clf=clf_tree.fit(X,y)
I got the following error. I was wondering if you could help me to resolve this. I appreciate your time.
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()