Calibrarion curve of a logistic Regression model I have a high imbalanced dataset and I fitted a logistic regression model on it. The calibration curve is:
As you can see there is poor calibration after 50. Is the model bad or the problem is the unbalanced dataset? Can I do anything to fix this?

Imbalance is irrelevant in logistic regression.  It expects imbalance in Y.  You appeared to have used binning in estimating the calibration curve.  This is arbitrary and has low precision.  Also you appeared to have estimated calibration on the same dataset used to fit the model (and you did not detail how the model was developed nor the frequency distribution of Y) without using resampling to account for overfitting.  The entire modeling and validation process needs to be thought through, accounting for overfitting, and then use a smooth calibration curve estimator as described here.
