api: YAML JSON TOON Database version: 1.0.0 format: toon dataset: id: 2849 slug: ml-evaluation-metrics title: Machine Learning Evaluation Metrics description: "Common ML evaluation metrics: Accuracy, Precision, Recall, F1 Score, ROC-AUC, MAE, MSE, and R-squared with formulas and best-use scenarios." summary: "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." use_when[2]: You need the formula and interpretation of a metric.,"You are choosing a metric for imbalanced classification, ranking or generation." caveats[3]: A single metric hides trade-offs; report several and choose by the cost of different errors.,Metrics such as BLEU correlate imperfectly with human judgment of quality.,"ROC-AUC can range from 0 to 1; 0.5 is a random ranking, not the lower bound. Report prevalence and the decision threshold alongside threshold-specific metrics." related[6]: statistics-basics,ai-ethics-interpretability,regularization-techniques,llm-glossary,rag-retrieval-metrics,experimental-design-pitfalls sources[1]{title,url}: scikit-learn model evaluation,"https://scikit-learn.org/stable/modules/model_evaluation.html" reading[1]: evaluate-rag-retrieval-before-generation reviewed_at: 2026-10-12 provenance: "Original editorial reference notes by YJTOON, informed by the linked primary documentation. External specifications retain their own licenses." entry_count: 21 fields[5]{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" category: AI & ML Terms category_slug: ai-ml-terms tags: "ml,evaluation,metrics,data science" view_count: 40 created_at: 1777673262 updated_at: 1791799373 data: metrics[21]{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"