Classification Metrics & Confusion Matrix
Compute accuracy, precision, recall, F1, specificity, and MCC from TP/FP/FN/TN counts. Built for Machine Learning, this workbench updates the confusion matrix and scalar readouts in real time as parameters change.
Technical Reference & Equations
- Gradient Descent with Momentum:
v_t = \beta v_{t-1} + \nabla L(\theta_t), \quad \theta_{t+1} = \theta_t - \eta v_t(eta: learning rate, beta: momentum coefficient (typically 0.9).) - Precision, Recall & F1 Score:
P = \frac{\mathrm{TP}}{\mathrm{TP} + \mathrm{FP}}, \quad R = \frac{\mathrm{TP}}{\mathrm{TP} + \mathrm{FN}}, \quad F_1 = \frac{2 P R}{P + R}(F1 is the harmonic mean of precision and recall, penalizing extreme imbalance.) - Matthews Correlation Coefficient (MCC):
\mathrm{MCC} = \frac{\mathrm{TP}\cdot\mathrm{TN} - \mathrm{FP}\cdot\mathrm{FN}}{\sqrt{(\mathrm{TP}+\mathrm{FP})(\mathrm{TP}+\mathrm{FN})(\mathrm{TN}+\mathrm{FP})(\mathrm{TN}+\mathrm{FN})}}(Balanced [-1, +1] score reliable even on heavily skewed datasets.)
Related Machine Learning Calculators
- Gradient Descent & Momentum: Inspect how learning rate and momentum traverse convex and non-convex loss landscapes.
- Activation Functions & Derivatives: Compare Sigmoid, Tanh, ReLU, Leaky ReLU, GELU, and Swish outputs alongside their gradients.
- Bayes’ Theorem Posterior: Update prior probabilities with test sensitivity and false-positive rates using a probability tree.
- Hypothesis Testing & Confidence Intervals: Compute Z-test and t-test statistics, exact p-values, shaded α rejection regions, and confidence intervals.
- Transformer Self-Attention & Softmax: Compute scaled dot-product attention softmax(QK^T / (tau sqrt(d_k))) V with causal vs. bidirectional masking, temperature entropy, and attention heatmaps.
- Base & Two’s Complement Converter: Convert between Binary, Octal, Decimal, Hex, and signed 8/16-bit Two’s Complement with interactive bit toggles.