Inside Orange Data Mining, classifiers are evaluated by wiring Data and one or more Learners into Test and Score, then chaining its Evaluation Results output into Confusion Matrix and ROC Analysis. Test and Score performs stratified cross-validation to compute AUC, Accuracy, F1, Precision, and Recall. Confusion Matrix breaks errors into True Positives, True Negatives, False Positives, and False Negatives, while ROC Analysis plots True Positive Rate against False Positive Rate across classification thresholds.
- 1. Comparing Multiple Models Inside Test and Score
- 2. Reading TP, TN, FP, and FN in Confusion Matrix
- 3. Interpreting ROC Curves and Threshold Trade-offs
- 4. Worked Confusion Matrix Metrics & ROC TPR/FPR Verification
- 5. Worked Evaluation Numericals From a 100-Sample Orange Matrix (TP=42, TN=48, FP=6, FN=4)
- 6. Common Mistakes & Top Scorer Tips
- 7. Interactive Concept Check Quiz
- 8. Frequently Asked Questions
1. Comparing Multiple Models Inside Test and Score
In Orange's Evaluate toolbox, the Test and Score widget serves as the central benchmarking hub. You connect a preprocessed Data table alongside multiple Learners, such as Decision Tree, kNN, Naive Bayes, and Logistic Regression, simultaneously into Test and Score's input ports. Selecting 5-fold or 10-fold stratified cross-validation splits the dataset repeatedly so every sample serves as an unseen test case once without leaking labels. The widget automatically tabulates AUC, Classification Accuracy (CA), F1-score, Precision, and Recall side by side for every connected learner. For CBSE Class 10 Part B and Class 12 Code 843 students, this direct visual benchmark demonstrates why Accuracy alone misleads on imbalanced datasets where predicting the majority class artificially inflates CA.
- Connect Learners (not already-fitted Models) directly to Test and Score for cross-validation.
- Stratified folds preserve class ratios across each training and validation split.
- Compare CA, Precision, Recall, and F1 together before declaring a winning model.
2. Reading TP, TN, FP, and FN in Confusion Matrix
Connecting Test and Score to the Confusion Matrix widget renders a grid comparing Actual rows against Predicted columns. In CBSE 417 board numericals, the four cells quantify exact model behavior: True Positive (TP) counts positives caught correctly, True Negative (TN) counts negatives cleared correctly, False Positive (FP) marks false alarms, and False Negative (FN) marks missed detections. From these four counts, Precision equals TP / (TP + FP), Recall equals TP / (TP + FN), Accuracy equals (TP + TN) / Total, and F1 equals 2 * Precision * Recall / (Precision + Recall). Inside Orange, clicking any off-diagonal cell highlights the misclassified rows, letting you pipe those exact errors into a Data Table to diagnose why the model slipped.
- High Precision minimizes False Positives (crucial in spam filters blocking real mail).
- High Recall minimizes False Negatives (vital in medical screening and fraud alerts).
- F1-score computes the harmonic mean of Precision and Recall on skewed data.
3. Interpreting ROC Curves and Threshold Trade-offs
While a Confusion Matrix evaluates predictions at one fixed probability cutoff such as 0.50, the ROC Analysis widget reveals classifier separability across every possible threshold from 0 to 1. Its horizontal axis plots False Positive Rate, equal to FP / (FP + TN), against True Positive Rate (Recall), equal to TP / (TP + FN), on the vertical axis. A curve hugging the top-left corner yields an Area Under the Curve (AUC) near 1.0, signaling strong ranking quality, whereas the diagonal line at AUC = 0.50 reflects random guessing. When comparing two CBSE practical models in Orange, selecting the curve with higher AUC and sliding the cost-ratio iso-line helps teams choose an operating threshold tailored to False Positive versus False Negative penalties.
- ROC curve plots TPR (y-axis) vs FPR (x-axis) across all classification cutoffs.
- AUC near 1.0 confirms robust class separation; AUC = 0.50 equals random coin flips.
- ROC Analysis lets you choose an optimal probability threshold based on error costs.
4. Worked Confusion Matrix Metrics & ROC TPR/FPR Verification
# Worked Confusion Matrix counts matching an Orange Test & Score output
TP, TN, FP, FN = 42, 48, 6, 4
total = TP + TN + FP + FN
accuracy = (TP + TN) / total
precision = TP / (TP + FP)
recall = TP / (TP + FN) # Also True Positive Rate (TPR)
fpr = FP / (FP + TN) # False Positive Rate for ROC X-axis
f1 = 2 * precision * recall / (precision + recall)
print(f"Total Samples: {total}")
print(f"Accuracy : {accuracy:.4f}")
print(f"Precision : {precision:.4f}")
print(f"Recall (TPR) : {recall:.4f}")
print(f"FPR (ROC X) : {fpr:.4f}")
print(f"F1 Score : {f1:.4f}")
Verified Console / Dry-Run Output:
Total Samples: 100
Accuracy : 0.9000
Precision : 0.8750
Recall (TPR) : 0.9130
FPR (ROC X) : 0.1111
F1 Score : 0.8936
5. Worked Evaluation Numericals From a 100-Sample Orange Matrix (TP=42, TN=48, FP=6, FN=4)
| Metric Name | Exact Formula | Substituted Calculation | Result & Orange Interpretation |
|---|---|---|---|
| Accuracy (CA) | (TP + TN) / (TP + TN + FP + FN) | (42 + 48) / 100 | 0.9000 (90% overall correct predictions) |
| Precision | TP / (TP + FP) | 42 / (42 + 6) = 42 / 48 | 0.8750 (87.5% of positive alerts are true) |
| Recall / TPR | TP / (TP + FN) | 42 / (42 + 4) = 42 / 46 | 0.9130 (91.3% of actual positives caught) |
| False Positive Rate | FP / (FP + TN) | 6 / (6 + 48) = 6 / 54 | 0.1111 (ROC horizontal coordinate at cutoff) |
| F1-Score | 2 * Precision * Recall / (Precision + Recall) | 2 * 0.8750 * 0.9130 / 1.7880 | 0.8936 (balanced Precision-Recall mean) |
Ace Confusion Matrix Numericals & Orange Viva
Work through board-style TP/FP/FN problems and live Orange workflows in 1:1 or 1:4 Micro-Pods at 4Achievers Junior.
6. Common Mistakes & Top Scorer Tips
- Avoid Mistake: Swapping False Positive and False Negative denominators when computing Precision versus Recall.
- Avoid Mistake: Treating high Accuracy on a 95:5 imbalanced dataset as proof of a good classifier without checking F1.
- Avoid Mistake: Wiring Predictions directly into Confusion Matrix instead of connecting Test and Score's Evaluation Results.
- Examiner / Mentor Tip: Always draw the 2x2 TP/TN/FP/FN table with Actual and Predicted axes labeled before substituting numbers.
- Examiner / Mentor Tip: State why Recall beats Precision in disease screening, while Precision matters more in spam blocking.
- Examiner / Mentor Tip: Mention AUC = 0.5 as the random baseline when explaining ROC Analysis in your practical viva.
7. Interactive Concept Check Quiz
Question: A spam classifier evaluated in Orange yields TP = 30, TN = 50, FP = 10, and FN = 10 across 100 emails. What are its Precision and Accuracy respectively?
8. Frequently Asked Questions
Can Confusion Matrix connect directly to a File widget in Orange?
Why does Orange's Test and Score show different metrics for the same model?
How do you inspect the exact misclassified rows inside Orange?
Explore Related Lessons & Free Interactive Tools
- All 60 Guides in CBSE AI (417 & 843) Guide Hub
- Generative AI Basics, Diffusion Models & Ethical Safeguards (CBSE AI)
- CBSE Class 12 Artificial Intelligence (Code 843) Guide
- Train-Test Split vs K-Fold Cross-Validation (Code 843)
- Interactive Tool: CBSE AI 417 Confusion Matrix & F1 Score Calculator
- Interactive Tool: CBSE Class 10 Best-of-5 Marks Replacement Calculator
