flennerhag / mlens

ML-Ensemble – high performance ensemble learning
http://ml-ensemble.com
MIT License
843 stars 108 forks source link

Evaluator has no attribute 'evaluate' #121

Closed unchitta closed 5 years ago

unchitta commented 5 years ago

Trying to use the Evaluator class to select models but kept getting this AttributeError:

accuracy_scorer = make_scorer(accuracy_score, average='micro', greater_is_better=True) ests = [('lr',LogisticRegression()), ('svm',SVC()), ('rf',RandomForestClassifier()), ('ada',AdaBoostClassifier())] evaluator = Evaluator(accuracy_scorer, cv=10, verbose=1) evaluator.evaluate(X, y, ests, params, n_iter=10)


AttributeError Traceback (most recent call last)

in () 30 ests = [('lr',LogisticRegression()), ('svm',SVC()), ('rf',RandomForestClassifier()), ('ada',AdaBoostClassifier())] 31 evaluator = Evaluator(accuracy_scorer, cv=10, verbose=1) ---> 32 evaluator.evaluate(X, y, ests, params, n_iter=10) AttributeError: 'Evaluator' object has no attribute 'evaluate'
unchitta commented 5 years ago

Ah, was reading the 0.1.x docs that's why.