Machine Learning Evaluation Metrics
Common ML evaluation metrics: Accuracy, Precision, Recall, F1 Score, ROC-AUC, MAE, MSE, and R-squared with formulas and best-use scenarios.
Common ML evaluation metrics: Accuracy, Precision, Recall, F1 Score, ROC-AUC, MAE, MSE, and R-squared with formulas and best-use scenarios.
Evaluation metrics for machine-learning models with type, formula, best use and range: accuracy, precision, recall, F1, ROC-AUC, MAE, MSE and R-squared, extended with specificity, log loss, RMSE, Matthews correlation, IoU, perplexity, BLEU, nDCG and Cohen's kappa.
| Name | Type | Formula | Best for | Range |
|---|---|---|---|---|
| Accuracy | Classification | (TP + TN) / (TP + TN + FP + FN) | Balanced datasets | [0, 1], higher is better |
| Precision | Classification | TP / (TP + FP) | Minimizing false positives | [0, 1], higher is better |
| Recall | Classification | TP / (TP + FN) | Minimizing false negatives | [0, 1], higher is better |
| F1 Score | Classification | 2 * (Precision * Recall) / (Precision + Recall) | Imbalanced datasets | [0, 1], higher is better |
| ROC-AUC | Classification | Area under ROC curve | Ranking quality | [0, 1]; 0.5 is the random-ranking baseline, and lower values are possible |
| MAE | Regression | mean(|y_true - y_pred|) | Average error magnitude | [0, inf), lower is better |
| MSE | Regression | mean((y_true - y_pred)^2) | Penalizing large errors | [0, inf), lower is better |
| R-squared | Regression | 1 - (SS_res / SS_tot) | Proportion of variance explained | (-inf, 1], higher is better |
| Specificity | Classification | TN / (TN + FP) | Measuring how well negatives are identified | [0, 1], higher is better |
| Log Loss | Classification | -(1/N) * sum(y log p + (1 - y) log(1 - p)) | Evaluating predicted probabilities | [0, infinity), lower is better |
| Matthews Correlation Coefficient | Classification | (TP*TN - FP*FN) / sqrt((TP+FP)(TP+FN)(TN+FP)(TN+FN)) | Imbalanced binary classification | [-1, 1], higher is better |
| RMSE | Regression | sqrt(mean((y - y_hat)^2)) | Regression where large errors should weigh more, in the units of the target | [0, infinity), lower is better |
| Intersection over Union | Detection and segmentation | |A intersect B| / |A union B| | Overlap between predicted and true regions | [0, 1], higher is better |
| Perplexity | Language modeling | exp(-(1/N) * sum(log p(w_i | context))) | Comparing language models on the same text | [1, infinity), lower is better |
| BLEU | Machine translation | Brevity penalty * geometric mean of n-gram precisions | Comparing translations with references | [0, 1], higher is better |
| nDCG | Ranking | DCG / ideal DCG | Search and recommendation quality with graded relevance | [0, 1], higher is better |
| Cohen's Kappa | Agreement | (p_o - p_e) / (1 - p_e) | Agreement between annotators beyond chance | [-1, 1], higher is better |
| Average Precision | Ranking / binary classification | sum((recall_n - recall_previous) * precision_n) | Summarizing the precision-recall tradeoff when positives are rare | [0, 1], higher is better; prevalence affects the baseline |
| Brier Score (binary) | Probability prediction | mean((p_positive - y_binary)^2) | Evaluating probabilistic predictions alongside calibration plots | [0, 1], lower is better |
| Balanced Accuracy | Classification | mean(recall_per_class) | Giving each class equal weight in the recall average | [0, 1], higher is better |
| Pinball Loss | Quantile regression | mean(max(q * error, (q - 1) * error)); error = y_true - y_pred | Evaluating a specified conditional quantile | [0, inf), lower is better |
The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.
| Section | Field | Type | Example |
|---|---|---|---|
| metrics | name | string | Accuracy |
| metrics | type | string | Classification |
| metrics | formula | string | (TP + TN) / (TP + TN + FP + FN) |
| metrics | best_for | string | Balanced datasets |
| metrics | range | string | [0, 1], higher is better |
The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.
curl "https://yjtoon.yunusemrevurgun.com/api/dataset/ml-evaluation-metrics?format=toon"
const res = await fetch( "https://yjtoon.yunusemrevurgun.com/static-data/dataset/ml-evaluation-metrics.toon" ); const toon = await res.text();
Rate limit: 120 requests per minute per IP, no key and no signup. API reference →
Original editorial reference notes by YJTOON, informed by the linked primary documentation. External specifications retain their own licenses.
Editorial review: . Source documents keep their own licenses.