Advanced Leave-One-Out CV Calculator

Test each row as a lone validation case. See fold metrics, residuals, and score summaries. Download polished outputs for review, sharing, compliance, and demos.

Calculator Input

Use regression for numeric targets. Use classification for labels.
The parser accepts: observed,predicted or id,observed,predicted,weight.
Enter one held-out prediction per line. Accepted formats: observed,predicted, observed,predicted,weight, or id,observed,predicted,weight.

Example Data Table

Fold ID Observed Predicted Weight Use Case
112.512.11.0Regression
214.014.41.0Regression
3YesNo1.0Classification
4NoNo1.0Classification
516.316.81.5Weighted regression

The calculator uses one row per held-out observation. Each row represents one LOOCV fold.

Formula Used

Leave-One-Out Cross-Validation trains the model on n - 1 rows and tests on the remaining row, repeating this process for every row.

Regression Metrics

Error = Predicted − Observed

MAE = Σ|Error| / n

MSE = Σ(Error²) / n

RMSE = √MSE

MAPE = [Σ(|Error| / |Observed|) × 100] / n, excluding zero observed values

Bias = ΣError / n

= 1 − (Σ(Error²) / Σ(Observed − Mean Observed)²)

Classification Metrics

Accuracy = (TP + TN) / Total

Error Rate = 1 − Accuracy

Precision = TP / (TP + FP)

Recall = TP / (TP + FN)

Specificity = TN / (TN + FP)

F1 = 2 × Precision × Recall / (Precision + Recall)

MCC uses all confusion matrix cells for a balanced binary score.

How to Use This Calculator

Choose regression or classification mode first.

Paste one held-out prediction row per line into the data box.

For classification, set the positive class label carefully.

Click Calculate LOOCV to view summary metrics and fold details.

Review the graph, inspect the per-fold table, then export CSV or PDF if needed.

Frequently Asked Questions

1. What does LOOCV measure?

LOOCV estimates model performance by holding out one observation at a time. It is useful for small datasets because every row becomes a validation case exactly once.

2. When should I use regression mode?

Use regression mode when observed and predicted values are numeric. The calculator then returns MAE, MSE, RMSE, MAPE, bias, and R² from the held-out predictions.

3. When should I use classification mode?

Use classification mode when your target is categorical, such as Yes or No. The calculator computes accuracy, error rate, precision, recall, specificity, F1, and MCC.

4. Why does the calculator ask for a positive class?

Precision, recall, specificity, F1, and MCC depend on the chosen positive class. Pick the label that represents the event or outcome you most care about tracking.

5. Can I include weights?

Yes. Add a weight as the last value in each row. Weighted rows influence summary metrics more strongly, which can help when some observations deserve greater emphasis.

6. Why is MAPE sometimes unavailable?

MAPE is not defined when an observed regression value is zero. The calculator skips zero observed rows for that specific metric while still computing other measures normally.

7. Is this calculator training a model?

No. This tool evaluates LOOCV outcomes that you already generated elsewhere. It summarizes held-out predictions, fold errors, and validation diagnostics from your prepared results.

8. What export formats are included?

You can export the calculated result table as CSV and save a polished PDF report from the rendered summary area. Both export buttons appear after calculation.

Related Calculators

cross validation confidence intervalrepeated stratified k foldcross validation sample size

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.