During GridSearchCV/RandomizedSearchCV we have different options to use for scoring, 'accuracy' being the most popular. However, in the case of unbalanced classes, such metrics as "f1_macro" are more appropriate. When we work with Keras, we can choose any metric in the compile line, however, no "f1_macro" or "f1_micro" is available. In case of using, let's say, "f1_macro" in GridSearch and "accuracy" in .compile, what score is actually returned after .best_score_ is typed? Do we have to use the same metrics in both create_model and GridSearch or we can safely omit metrics in compile?

Thank you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.