Reputation: 315
Is there a way to define the scoring method when using hyperopt-sklearn for classifiers ?
By default, it seems to be the model.score method of sklearn, so accuracy for classifiers. But for some problems (eg : imbalanced classes), accuracy is not the best metric…
Upvotes: 0
Views: 576
Reputation: 91
HyperoptEstimator
takes an optional loss function argument that defaults to accuracy, see here:
https://github.com/hyperopt/hyperopt-sklearn/blob/master/hpsklearn/estimator.py#L477-L482
Upvotes: 1