setting class weights for imbalanced dataset, how using EarlyStopping?
Early stopping is not directly affected by imbalanced data.
Also comput_class_weight effects the training, not the evaluation.
As far as picking a metric for evaluating imbalanced data, it depends on the specific problem. The most common choices are F-score, precision, and recall. It appears that you are using scikit-learn which offers a weighted option, finding average weighted by class support.