Lensa ML
Lensa ML

Model Evaluation & Metrics

Step 1 of 6

Beyond Accuracy

Why accuracy isn't enough

Predicted 1Predicted 0Actual 1Actual 0TP50FN0FP50TN0
Class balance (% positive)50% / 50%
ACCURACY
50%
STRATEGY
Always "1"
USEFUL?
No!

At 50/50 balance, the "always predict majority" trick gives only 50% accuracy. But with imbalanced data, accuracy becomes a misleading metric. Try dragging toward 90%+.

Step 1 of 6: Beyond Accuracy

Why accuracy isn't enough

Predicted 1Predicted 0Actual 1Actual 0TP50FN0FP50TN0
Class balance (% positive)50% / 50%
ACCURACY
50%
STRATEGY
Always "1"
USEFUL?
No!

At 50/50 balance, the "always predict majority" trick gives only 50% accuracy. But with imbalanced data, accuracy becomes a misleading metric. Try dragging toward 90%+.

Step 2 of 6: The Confusion Matrix

True/false × positive/negative

Predicted +Predicted −Actual +Actual −TP38FN12FP15TN35
Decision thresholdθ = 0.50
TP
38
FP
15
TN
35
FN
12

TP (correct positive) and TN (correct negative) are good. FP (false alarm) and FN (missed detection) are errors. Balanced threshold: good tradeoff between FP and FN.

Step 3 of 6: Precision & Recall

The tradeoff

RecallPrecision0.250.250.50.50.750.75
Threshold0.50
PRECISION
0.717
RECALL
0.760
THRESHOLD
0.50

Precision = "Of those I predicted positive, how many were correct?" (38/53). Recall = "Of all actual positives, how many did I find?" (38/50). They trade off — you can't maximize both at once.

Step 4 of 6: F1 Score

The harmonic mean

ThresholdScorePRF1 peak
Threshold0.50
F1 SCORE
0.738
PRECISION
0.717
RECALL
0.760

The F1 score is the harmonic mean of precision and recall: 2PR/(P+R) = 0.738. The peak F1 = 0.794 is at θ ≈ 0.35. Try moving the threshold there.

Step 5 of 6: ROC Curve

True positive rate vs false positive rate

FPRTPR0.250.250.50.50.750.75randomAUC = 0.874
Threshold (sweeps the curve)0.50
TPR
0.760
FPR
0.300
AUC
0.874

The ROC curve plots TPR vs FPR at every threshold. The AUC (area under curve) = 0.874 — measures overall model quality. AUC = 1.0 is perfect, 0.5 is random. This model performs well above random.

Step 6 of 6: Regression Metrics

MSE, MAE, R²

Model complexity (polynomial degree)degree = 1
MSE
1.41
MAE
0.89
-0.521

MSE penalizes large errors heavily. MAE is more robust to outliers. R² = -0.521 — the fraction of variance explained. A linear fit may underfit — try increasing complexity.