Krystof
Krystof

Reputation: 315

Setting the scoring method for hyperopt-sklearn

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

Answers (1)

Max Pumperla
Max Pumperla

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

Related Questions