0

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…

Krystof
  • 185
  • 1
  • 11

1 Answers1

1

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