Worked Example: Worked Mathematical Example: MCC, F1 & Confusion Matrix
Evaluate imbalanced binary classifiers via MCC, F1, Precision, Recall, Specificity, and Youden’s J.
- Specify the function parameters, matrix entries, or confusion matrix counts.
- Apply the closed-form or iterative formula: MCC = (TP·TN − FP·FN) / √((TP+FP)(TP+FN)(TN+FP)(TN+FN)); F1 = 2·TP / (2·TP + FP + FN).
- Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes MCC, F1 & Confusion Matrix via MCC = (TP·TN − FP·FN) / √((TP+FP)(TP+FN)(TN+FP)(TN+FN)); F1 = 2·TP / (2·TP + FP + FN).
Mathematics & Statistics · Machine Learning & Classification Metrics
Matthews Correlation Coefficient (MCC), F1-Score, Cohen’s Kappa & Youden’s J Calculator: inputs, method, and how to read the result
Evaluate imbalanced binary classifiers via MCC, F1, Precision, Recall, Specificity, and Youden’s J.
Choose inputs for the case you are checking
The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.
- True Positives Tp: True Positives (TP).
- False Positives Fp: False Positives (FP / Type I Error).
- False Negatives Fn: False Negatives (FN / Type II Error).
- True Negatives Tn: True Negatives (TN).
What the calculation includes
With the default values shown, Matthews Correlation Coefficient (MCC) is 0.841 MCC (−1 to +1). The calculation follows MCC, F1 & Confusion Matrix Formula; the formula and variable definitions above show how the inputs combine.
One-input check: With the other defaults held constant, changing True Positives Tp from 85 TP to 94 TP changes Matthews Correlation Coefficient (MCC) from 0.841 MCC (−1 to +1) to 0.852 MCC (−1 to +1). This is a comparison inside the calculator's stated model, not a prediction.
Where to use caution
- Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
- Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.
Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.
More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.