CBSE Class 10 AI (Code 417) board numericals in the 40-mark Part B paper center on four evaluation formulas and two NLP text-vector equations. From a Confusion Matrix of TP, TN, FP, and FN, Accuracy = (TP+TN)/(TP+TN+FP+FN), Precision = TP/(TP+FP), Recall = TP/(TP+FN), and F1 Score = 2×Precision×Recall/(Precision+Recall). In NLP, Bag of Words counts word frequencies, while TF-IDF weights terms via TF × log(N/DF) to suppress frequent stop words.
- 1. Model Evaluation Formulas: Confusion Matrix, Precision, Recall & F1
- 2. NLP Definitions: Text Normalization, Bag of Words & TF-IDF
- 3. Modeling Taxonomy, Ethical Frameworks & Computer Vision Essentials
- 4. Class 10 AI 417: Confusion Matrix & TF-IDF Calculator
- 5. Worked CBSE Class 10 AI (417) Formula Cheat Sheet
- 6. Common Mistakes & Top Scorer Tips
- 7. Interactive Concept Check Quiz
- 8. Frequently Asked Questions
1. Model Evaluation Formulas: Confusion Matrix, Precision, Recall & F1
Evaluating a binary classifier in Unit 3 begins with comparing predicted labels against ground-truth realities in a 2×2 Confusion Matrix. True Positive (TP) and True Negative (TN) capture correct predictions, whereas False Positive (FP, Type I error) flags an actual negative as positive and False Negative (FN, Type II error) misses an actual positive. Accuracy divides total correct predictions (TP + TN) by all samples, yet becomes misleading on imbalanced datasets such as rare disease screening. Precision, TP / (TP + FP), measures how trustworthy positive alerts are—critical when FP is costly, like spam filtering. Recall, TP / (TP + FN), measures how many real positives the model catches—critical when FN is dangerous, like wildfire or cancer detection. F1 Score computes their harmonic mean, 2 × (Precision × Recall) / (Precision + Recall), balancing both tradeoffs cleanly.
- High Precision minimizes False Positives (avoiding marking genuine emails as spam).
- High Recall minimizes False Negatives (avoiding missing critical medical or fraud cases).
- F1 Score reaches 1.0 only when both Precision and Recall equal 1.0; it penalizes extreme gaps more than an arithmetic average.
2. NLP Definitions: Text Normalization, Bag of Words & TF-IDF
Natural Language Processing (Unit 5) converts unstructured human sentences into numeric feature vectors through strict preprocessing steps. Text Normalization first performs sentence segmentation and word tokenization, strips punctuation, converts tokens to lowercase, and removes high-frequency stop words like 'the' or 'is'. Next, Stemming chops suffixes crudely to yield fast root forms (often non-dictionary stems like 'studi'), whereas Lemmatization uses vocabulary and morphological context to return valid base words called lemmas ('study'). After cleaning, the Bag of Words (BoW) algorithm builds a vocabulary dictionary of unique corpus words and records raw term counts per document. Finally, TF-IDF—Term Frequency multiplied by Inverse Document Frequency, log(N / df)—assigns higher scores to terms frequent within one document yet rare across the entire corpus, spotlighting distinctive keywords.
- Stemming is faster and rule-based; Lemmatization is slower yet produces linguistically valid dictionary words.
- A word appearing in every document has df = N, making log(N / df) = log(1) = 0, so its TF-IDF weight drops to zero.
- Bag of Words ignores word order and grammar, capturing only occurrence frequencies.
3. Modeling Taxonomy, Ethical Frameworks & Computer Vision Essentials
Units 1, 2, and 4 supply high-yield definitions for 1-mark and 2-mark board questions alongside the 10-mark Part A Employability section. In AI Modeling, Rule-Based systems follow static human-written if-then logic, whereas Learning-Based systems extract patterns from data across Supervised (labeled Regression for continuous numbers, Classification for discrete classes), Unsupervised (unlabeled Clustering and Association), and Reinforcement learning (reward-penalty feedback). Ethical Frameworks categorize principles into Sector-Based (such as Bioethics: autonomy, non-maleficence, beneficence, justice) and Value-Based (rights, utility, virtue). In Computer Vision, digital images consist of pixels—single 0–255 intensity grids for grayscale or three 0–255 channels (Red, Green, Blue) for RGB—where resolution defines pixel dimensions and Convolutional Neural Networks (CNNs) extract edges and textures via kernels.
- Neural Network layers comprise Input (receives features), Hidden (weighted sums + activation), and Output (final decision).
- RGB pixel (0, 0, 0) renders pure black, while (255, 255, 255) renders pure white.
- Classification predicts discrete categories (spam/not spam); Regression predicts continuous quantities (house price).
4. Class 10 AI 417: Confusion Matrix & TF-IDF Calculator
import math
tp, tn, fp, fn = 40, 45, 10, 5
accuracy = (tp + tn) / (tp + tn + fp + fn)
precision = tp / (tp + fp)
recall = tp / (tp + fn)
f1 = 2 * precision * recall / (precision + recall)
# TF-IDF for word "model" in a 4-doc corpus (df = 2, raw tf = 3 in doc1)
N, df, tf = 4, 2, 3
idf = math.log10(N / df)
tfidf = tf * idf
print(f"Acc: {accuracy:.2f}, Prec: {precision:.2f}, Rec: {recall:.3f}, F1: {f1:.3f}")
print(f"TF-IDF('model'): {tfidf:.3f}")
Verified Console / Dry-Run Output:
Acc: 0.85, Prec: 0.80, Rec: 0.889, F1: 0.842
TF-IDF('model'): 0.903
5. Worked CBSE Class 10 AI (417) Formula Cheat Sheet
| Metric / Term | Exact Formula | Worked Input Values | Computed Output |
|---|---|---|---|
| Accuracy | (TP + TN) / (TP + TN + FP + FN) | TP=40, TN=45, FP=10, FN=5 | 85 / 100 = 0.85 (85%) |
| Precision | TP / (TP + FP) | TP=40, FP=10 | 40 / 50 = 0.80 |
| Recall | TP / (TP + FN) | TP=40, FN=5 | 40 / 45 = 0.889 |
| F1 Score | 2 × Precision × Recall / (Precision + Recall) | Precision=0.80, Recall=0.889 | 0.842 |
| TF-IDF (Base 10) | TF × log10(N / DF) | TF=3, N=4 docs, DF=2 docs | 3 × 0.301 = 0.903 |
Master Class 10 AI 417 Numericals 1:1
Drill Confusion Matrix, TF-IDF, and Part B board derivations with live feedback in 4Achievers Junior 1-on-1 or 1:4 Micro-Pods.
6. Common Mistakes & Top Scorer Tips
- Avoid Mistake: Swapping Precision and Recall denominators—Precision divides by (TP + FP) [predicted positives], while Recall divides by (TP + FN) [actual positives].
- Avoid Mistake: Averaging Precision and Recall arithmetically instead of computing the harmonic mean 2PR/(P+R) for F1 Score.
- Avoid Mistake: Forgetting to remove stop words or lowercase words before building a Bag of Words vocabulary.
- Avoid Mistake: Confusing pixel value 0 (black) with 255 (white) in 8-bit grayscale Computer Vision grids.
- Examiner / Mentor Tip: Always draw the 2×2 Confusion Matrix with Actual and Predicted axes clearly labeled before plugging numbers into Precision or Recall.
- Examiner / Mentor Tip: Write the formula first in every 2-mark or 4-mark evaluation question so you earn step marks even if arithmetic slips.
- Examiner / Mentor Tip: For TF-IDF theory questions, remember that common words across all documents get IDF = 0, which filters out noise automatically.
7. Interactive Concept Check Quiz
Question: A spam classifier yields TP = 30, FP = 10, FN = 20, and TN = 40. What is its Precision?
8. Frequently Asked Questions
When is Recall prioritized over Precision in CBSE Class 10 AI board questions?
Do we use natural log or base-10 log in CBSE TF-IDF calculations?
How many marks does Part B carry versus Part A in Class 10 AI (Code 417)?
Explore Related Lessons & Free Interactive Tools
- All 60 Guides in CBSE AI (417 & 843) Guide Hub
- 25 Assertion & Reasoning Questions for CBSE Class 10 AI (Code 417)
- Competency Case-Based Questions Solved (CBSE Class 10 AI 417)
- CBSE Class 10 AI Sample Paper: Part A Employability Skills MCQs
- Interactive Tool: CBSE AI 417 Confusion Matrix & F1 Score Calculator
- Interactive Tool: CBSE Class 10 Best-of-5 Marks Replacement Calculator
