I believe you have inadvertantly forgotten to to take the square root of the denominator in your blog, this will result in the incorrect calculation of matthew's correlation coefficient. I recognize that most will just use sklearn's built in function for mcc, however in the off chance someone is using the actual equations that would not arrive at the correct metric.
Currently as written this is how you would calculate MCC in accordance with the equation in your blog:
matthews_correlation_coefficient = (tp * tn - fp * fn) / ((tp + fp)*(tp + fn)*(tn + fp)*(tn + fn))
However it should be:
matthews_correlation_coefficient = (tp * tn - fp * fn) / math.sqrt((tp + fp)*(tp + fn)*(tn + fp)*(tn + fn))
I realize that this blog is a few years old now, but the proliferation of incorrect equations, metrics, etc. on popular data science blogs is inadvertently / unintentionally problematic as less experienced data scientists and machine learning engineers may be less familiar with the actual equations. I really appreciate the work of data scientists and machine learning engineers who do nice blogs like you for the broader DS/ML community, so more than anything just really just wanted to flag this for you.