Artificial Intelligence Part B - Unit 3 4 Study Options Available

Unit 3: Evaluating Models

CHAPTER PDF

Complete curriculum textbook chapter document for reading and offline study.

NOTES

Complete conceptual breakdown, formulas, diagrams, and memory aids.

CBSE Class 10 AI – Unit 3 Evaluating Models
CBSE CLASS 10 · ARTIFICIAL INTELLIGENCE · UNIT 3

Evaluating Models

Complete student-friendly notes, formulas, solved activities, textbook questions and board-oriented practice.

Prepared from the complete uploaded 25-page Chapter3.pdf, including page diagrams and tables.

Unit overview

This unit explains how to measure AI model performance and decide whether a model is reliable and suitable for real-world use.

Learning objectives
  1. Understand common evaluation metrics.
  2. Derive and calculate metrics.
  3. Choose a suitable metric for an application.
Learning outcomes
  1. Recognise evaluation metrics.
  2. Calculate evaluation metrics.
  3. Select a metric for real-life use cases.

Prerequisite: Essential understanding of AI. Key concepts: Importance of model evaluation and classification metrics.

Introduction

The four earlier AI project-cycle stages are Problem Scoping, Data Acquisition, Data Exploration and Modelling. Evaluation compares models and estimates how well a selected model will work on future unseen data.

Problem Scoping → Data Acquisition → Data Exploration → Modelling → Evaluation

3.1 Importance of Model Evaluation

Model evaluation is the process of using different evaluation metrics to understand a machine-learning model's performance.
  • An AI model can improve through constructive feedback.
  • Build, measure, improve and repeat until desirable performance is achieved.
  • Evaluation reveals strengths, weaknesses and suitability.

School report-card analogy

Grades, percentages, percentiles and ranks show a student's performance. Similarly, evaluation metrics show where an AI model performs well and where it needs improvement.

Train model → Test model → Evaluate result → Improve model
Evaluation measures performance on unseen data; it is not enough that a model merely returns an answer.

3.2 Splitting the Training Set Data for Evaluation

Train-test split divides a dataset into a training subset and a testing subset to evaluate a machine-learning algorithm.
  • It can be used for supervised-learning algorithms.
  • Training data teaches the model; testing data evaluates it.
  • It is appropriate when a sufficiently large dataset is available.

Textbook diagram: 10,000 labelled images

10,000 labelled images → 8,000 training2,000 testing

Why split data?

  1. Train the model on the training subset.
  2. Give test inputs to the trained model.
  3. Obtain predictions.
  4. Compare predictions with expected values.
  5. Estimate performance on data not used in training.
Overfitting: When a model memorises training examples and performs poorly on new data. Testing on training data can give an unrealistically high score.

The PDF notes that train-test split and cross-validation are studied in more detail in higher classes.

3.3 Accuracy and Error

Concert-fee example

Bob brings ₹300 and Billy ₹550; the actual entry fee is ₹500.

PersonEstimateActualAbsolute error
Bob₹300₹500|500−300| = ₹200
Billy₹550₹500|500−550| = ₹50

Billy is more accurate because his estimate is closer to the actual fee.

Accuracy measures the proportion or number of predictions a model gets right out of all predictions.
Error is the difference between a prediction and the actual outcome. It quantifies mistakes or the distance between predicted and actual values.

In disease prediction, predicting “no disease” when the person actually has the disease is an error. If every prediction in the evaluated set is correct, accuracy is 100%.

Goal: minimise error and maximise accuracy. Accuracy alone may not be sufficient; in medical diagnosis, missing a disease can be more serious than a false alarm.

Activity 1 – Accuracy of the House-Price Model

Purpose: Calculate error and accuracy for five predicted house prices. Model accuracy is the mean of the five sample accuracies.

Absolute Error = |Actual − Predicted|
Error Rate = Absolute Error ÷ Actual
Accuracy = 1 − Error Rate
Accuracy % = Accuracy × 100

Abs means absolute value: use the magnitude without a negative sign.

PredictedActualAbs. errorError rateAccuracy%
$391k$402k$11k.02736.9726497.26%
$453k$488k$35k.07172.9282892.83%
$125k$97k$28k.28866.7113471.13%
$871k$907k$36k.03969.9603196.03%
$322k$425k$103k.24235.7576575.76%
Sample 1 – notebook working
Absolute error = |402,000 − 391,000| = $11,000
Error rate = 11,000 ÷ 402,000 = 0.02736
Accuracy = 1 − 0.02736 = 0.97264
Accuracy % = 0.97264 × 100 = 97.26%
Mean accuracy
(.97264 + .92828 + .71134 + .96031 + .75765) ÷ 5 = .86604 = 86.60%

The PDF rounds sample 1 to 97.3%; extra decimals are retained here for a reproducible mean.

3.4 Evaluation Metrics for Classification

Classification predicts a class label or category from input data.

Supermarket example: separate fruits and vegetables from grocery items such as bread, oil and eggs. A classifier predicts the item's category.

Textbook “Try Yourself”

Choices: house-price prediction, credit-card fraud detection, salary prediction.

Answer: Credit-card fraud detection. Fraud/legitimate are categories. House prices and salaries are numerical amounts and are usually regression tasks.

Classification metrics

  • Confusion matrix
  • Classification accuracy
  • Precision
  • Recall
  • F1 score

Confusion Matrix

Confusion matrix compares actual class values with predicted class values and counts each outcome.

In the medical example, output 1 means infected and 0 means not infected. Actual values are rows/y-axis; predicted values are columns/x-axis.

Actual \ PredictedPositive (1)Negative (0)
Positive (1)TPFN
Negative (0)FPTN

The source matrix on pages 8–9 shows TP=12, FN=6, FP=4 and TN=21. Green cells are correct; red cells are incorrect.

Activity 2 – Build a Confusion Matrix from Scratch

Duration: 10 minutes. Yes means disease present; No means disease absent. The ten rows from PDF page 10:

RowActualPredictedOutcome
1YesYesTP
2NoNoTN
3NoYesFP
4YesNoFN
5NoNoTN
6YesYesTP
7YesNoFN
8NoNoTN
9NoNoTN
10NoNoTN

Counts: TP=2, FN=2, FP=1, TN=5.

Actual \ PredictedYesNoTotal
YesTP=2FN=24
NoFP=1TN=56
Total3710
Correct predictions = TP + TN = 2 + 5 = 7. Total predictions = 10. Hence 7 out of 10 are correct.

TP, TN, FP and FN

True Positive (TP): Actual positive and predicted positive. Examples: predict France will win and it wins; predict disease and the person has disease. Source matrix value: 12.
True Negative (TN): Actual negative and predicted negative. Examples: predict Germany will not win and it loses; predict no disease and the person is healthy. Value: 21.
False Positive (FP): Actual negative but predicted positive. Examples: predict Germany will win but it loses; predict disease when the person is healthy. It is a false alarm. Value: 4.
False Negative (FN): Actual positive but predicted negative. Examples: predict France will not win but it wins; predict no disease when the person has disease. It is a missed positive. Value: 6.
Memory trick: True = correct; False = incorrect. Positive/Negative describes the predicted class. Read the matrix axes carefully.

Classification Accuracy from a Confusion Matrix

Accuracy = (TP + TN) ÷ (TP + TN + FP + FN)

Given TP=12, FN=6, FP=4 and TN=21:

Correct = TP + TN = 12 + 21 = 33
Total = 12 + 6 + 4 + 21 = 43
Accuracy = 33 ÷ 43 = 0.7674
Accuracy % = 0.7674 × 100 = 76.74%

Accuracy cannot always be used alone. It may mislead on imbalanced data or when false positives and false negatives have different costs.

Activity 3 – Accuracy on an Unbalanced Dataset

There are 1,000 test records: 900 actual Yes/pass and 100 actual No/not pass. The faulty model predicts Yes for every input.

ActualPredicted
Yes=900Yes=1,000
No=100No=0
Actual \ PredictedYesNo
YesTP=900FN=0
NoFP=100TN=0
Accuracy = (TP+TN)/(TP+TN+FP+FN)
= (900+0)/(900+0+100+0)
= 900/1,000 = 0.9 = 90%

The model scores 90% but never correctly predicts the No class. This proves that accuracy alone can be misleading for unbalanced data.

Precision

Precision is the ratio of correctly classified positive examples to all examples predicted positive.
Precision = TP ÷ (TP + FP)

Precision .843 means that when the model predicts heart disease, it is correct about 84.3% of the time.

Use precision when false positives are costly and must be reduced. It answers: of all predicted positives, how many are actually positive?

Textbook example: satellite launch weather

Favourable weather is positive. Missing a good day may be acceptable, but calling unsafe weather favourable could be disastrous. Reduce false positives; therefore precision matters.

Recall

Recall measures how many actual positive cases are correctly identified. It is also called Sensitivity or True Positive Rate (TPR).
Recall = TP ÷ (TP + FN)

Recall .86 means 86% of all patients who actually have heart disease are correctly identified.

Use recall when false negatives are costly. It answers: of all actual positives, how many did the model find?

Textbook example: COVID-19 detection

If an infected person is predicted as not infected, they may miss treatment and infect others. False negatives must be reduced, so recall is the appropriate metric.

Correction: the last line on PDF page 18 says “Precision” although the discussion concerns reducing false negatives. The correct metric is Recall, as confirmed by the formula and preceding explanation.

F1 Score

F1 score combines precision and recall into one measure; it is their harmonic mean.
F1 = 2 × Precision × Recall ÷ (Precision + Recall)

Use F1 on unbalanced data when neither false positives nor false negatives can be ignored and a balance is required.

Example: P=.80, R=.60. F1=2×.80×.60/(.80+.60)=.96/1.40=.6857.
MetricFormulaFocus
Accuracy(TP+TN)/TotalOverall correctness
PrecisionTP/(TP+FP)Reduce FP
RecallTP/(TP+FN)Reduce FN
F12PR/(P+R)Balance P and R

Activity 4 – Fraud Detection

Duration: 30 minutes. In the textbook case, a legitimate transaction wrongly flagged can be rechecked, but a fraudulent transaction classified as legitimate may go unnoticed. Reduce false negatives; therefore Recall is the appropriate metric.

IDActualPredicted
1Non-fraudNon-fraud
2Non-fraudFraud
3Non-fraudNon-fraud
4FraudNon-fraud
5FraudFraud
6Non-fraudNon-fraud
7FraudNon-fraud
8Non-fraudFraud
9Non-fraudNon-fraud
10Non-fraudNon-fraud

Counts: TP=1, FN=2, FP=2, TN=5.

Actual \ PredictedFraudNon-fraud
FraudTP=1FN=2
Non-fraudFP=2TN=5
Recall = TP/(TP+FN)
= 1/(1+2) = 1/3 = .3333
Recall = 33.33%

Ethical Concerns Around Model Evaluation

The diagram on PDF page 21 lists three concerns:

Bias

Chosen metrics should not produce or hide bias. Evaluation data should fairly represent affected people and situations.

Transparency

Explain honestly how metrics work and how results are produced. Do not hide the methodology.

Accountability

Take responsibility for metric selection and evaluation methodology, especially where AI affects people or society.

Board answer: Bias, Transparency and Accountability.

Textbook Test Yourself – 10 MCQs with Solutions

1. Medical test: 1,000 people; 50 diseased, 950 healthy; TP=40 and 30 healthy people wrongly positive. Find accuracy.
  1. 97%
  2. 90%
  3. 85%
  4. 70%
Solution: TP=40, FN=10, FP=30, TN=920. Accuracy=(40+920)/1000=96%. None of the printed options is correct.
2. A student answers 90 of 100 questions correctly. Find error rate.
  1. 10%
  2. 9%
  3. 8%
  4. 11%
Solution: Wrong=100−90=10. Error rate=10/100×100=10%. Option A.
3. Out of 1,000 emails, TP=240 spam and FP=60 legitimate emails marked spam. Find precision.
  1. 80%
  2. 70%
  3. 75%
  4. 90%
Solution: Precision=240/(240+60)=80%. Option A.
4. A model predicts 70 instances positive, of which 50 are actually positive. Find recall.
  1. 50%
  2. 70%
  3. 80%
  4. 100%
Solution: TP=50 and FP=20, but FN or total actual positives is not given. Recall cannot be calculated. 50/70 is precision, not recall; question incomplete.
5. 120 positive sentiments correctly predicted out of 200 actual positives; 40 negatives wrongly predicted positive. Find F1.
  1. 0.8
  2. 0.75
  3. 0.72
  4. 0.82
Solution: TP=120, FN=80, FP=40. Precision=.75; recall=.60; F1=.6667. No listed option matches.
6. 1,000 people; 100 diseased, TP=90 and FP=50. Find precision.
  1. 90%
  2. 80%
  3. 70%
  4. 60%
Solution: Precision=90/(90+50)=64.29%. D (60%) is closest, but not exact.
7. Predicted marks 75; actual marks 80. Absolute error?
  1. 5
  2. 10
  3. 15
  4. 20
Solution: Absolute error=|80−75|=5. Option A.
8. Goal of evaluating an AI model?
  1. Maximise error
  2. Minimise error and maximise accuracy
  3. Only count data points
  4. Prioritise complexity
Solution: Minimise error and maximise accuracy. Option B.
9. A high F1 score generally suggests?
  1. Imbalance between P and R
  2. Good balance between P and R
  3. Only selected points
  4. More training data
Solution: F1 combines precision and recall. Option B.
10. Relationship between performance and accuracy?
  1. Inverse
  2. Not related
  3. Direct
  4. Random
Solution: The textbook describes them as directly proportional. Option C.

Reflection Time – Model Answers

Q1. What happens if a model is deployed without evaluation on known test data?
Errors, weaknesses and bias may remain undiscovered. The model may have overfitted training data and perform poorly on unseen examples. Testing estimates generalisation before deployment.
Q2. Is evaluation essential in the AI project cycle?
Yes. It measures performance, reveals errors, supports model comparison, guides improvement and helps determine whether the model is suitable for real-world use.
Q3. Explain train-test split with an example.
Divide data into training and testing subsets. Train on one subset and evaluate on the separate test subset. Example: 8,000 of 10,000 labelled images for training and 2,000 for testing.
Q4. Justify why both error and accuracy are important.
Accuracy measures the proportion of correct predictions; error measures mistakes or difference from actual values. Together they support model comparison and improvement. Accuracy alone can mislead on imbalanced data.
Q5. What is classification accuracy? Can it always be used?
Accuracy=(TP+TN)/(TP+TN+FP+FN). It cannot always be used alone because imbalanced data may produce high accuracy while the minority class is missed. It also assumes errors have similar importance.

Assertion and Reasoning

Options: (a) Both true and R explains A; (b) Both true but R does not explain A; (c) A true, R false; (d) A false, R true.

Q1. A: Accuracy measures the number of predictions a model gets right. R: Better model performance generally produces more accurate predictions.
Answer: (b). Both are true, but the reason does not explain the definition or calculation of accuracy.
Q2. A: Sum of a confusion-matrix row represents total instances for an actual class. R: This enables calculation of class-specific metrics such as precision and recall.
Answer: (b). Both are true, but R is not the direct explanation. Row totals are actual-class counts and are especially useful for recall; precision uses predicted-positive column totals.

Case Study-Based Questions – Solved

Q1. Choose Precision or Recall

Email spam detection
Precision is often important when legitimate emails wrongly marked as spam are costly. If the goal is to catch every spam message, recall may also be prioritised; identify the more harmful error.
Cancer diagnosis
Recall is especially important because a false negative misses a patient who has cancer.
Legal cases – innocent until proven guilty
Precision matters when a positive prediction implies wrongdoing, because false positives may wrongly label innocent people. AI must not replace due process.
Fraud detection
Recall matters when missing fraud is more costly than flagging a legitimate transaction for review.
Safe content filtering for children
Recall helps catch harmful content by reducing false negatives; precision also prevents safe content being wrongly blocked.

Q2. Calculate accuracy, precision, recall and F1

Formulas: Accuracy=(TP+TN)/Total; Precision=TP/(TP+FP); Recall=TP/(TP+FN); F1=2PR/(P+R).

Case 1 – Spam detection
Actual \ PredictedPositiveNegative
PositiveTP=150FN=50
NegativeFP=50TN=750
Notebook-style calculations
Total=150+50+750+50=1000
Accuracy=(150+750)/1000=0.9000=90.00%
Precision=150/(150+50)=0.7500=75.00%
Recall=150/(150+50)=0.7500=75.00%
F1=2×0.7500×0.7500/(0.7500+0.7500)=0.7500 (75.00%)
Case 2 – Credit default
Actual \ PredictedPositiveNegative
PositiveTP=90FN=50
NegativeFP=40TN=820
Notebook-style calculations
Total=90+40+820+50=1000
Accuracy=(90+820)/1000=0.9100=91.00%
Precision=90/(90+40)=0.6923=69.23%
Recall=90/(90+50)=0.6429=64.29%
F1=2×0.6923×0.6429/(0.6923+0.6429)=0.6667 (66.67%)
Case 3 – Fraud detection
Actual \ PredictedPositiveNegative
PositiveTP=80FN=40
NegativeFP=30TN=850
Notebook-style calculations
Total=80+30+850+40=1000
Accuracy=(80+850)/1000=0.9300=93.00%
Precision=80/(80+30)=0.7273=72.73%
Recall=80/(80+40)=0.6667=66.67%
F1=2×0.7273×0.6667/(0.7273+0.6667)=0.6957 (69.57%)
Case 4 – Medical diagnosis
Actual \ PredictedPositiveNegative
PositiveTP=120FN=60
NegativeFP=20TN=800
Notebook-style calculations
Total=120+20+800+60=1000
Accuracy=(120+800)/1000=0.9200=92.00%
Precision=120/(120+20)=0.8571=85.71%
Recall=120/(120+60)=0.6667=66.67%
F1=2×0.8571×0.6667/(0.8571+0.6667)=0.7500 (75.00%)
Case 5 – Inventory stockout
Actual \ PredictedPositiveNegative
PositiveTP=100FN=50
NegativeFP=50TN=800
Notebook-style calculations
Total=100+50+800+50=1000
Accuracy=(100+800)/1000=0.9000=90.00%
Precision=100/(100+50)=0.6667=66.67%
Recall=100/(100+50)=0.6667=66.67%
F1=2×0.6667×0.6667/(0.6667+0.6667)=0.6667 (66.67%)
Source correction – Case 5: The PDF repeats the TN line. The intended values TP=100, FP=50, TN=800, FN=50 sum to 1,000; they are used above.

Chapter Summary and Revision Sheet

Important definitions

  • Model evaluation: Measuring model performance using metrics.
  • Train-test split: Dividing data into training and testing subsets.
  • Overfitting: Memorising training examples and failing to generalise.
  • Accuracy: Correct predictions divided by total predictions.
  • Error: Difference between prediction and actual outcome.
  • Classification: Predicting a category.
  • Confusion matrix: Comparing actual and predicted classes.
  • TP: Actual positive predicted positive.
  • TN: Actual negative predicted negative.
  • FP: Actual negative predicted positive.
  • FN: Actual positive predicted negative.
  • Precision: Correct positives among predicted positives.
  • Recall: Correct positives among actual positives.
  • F1: Harmonic mean of precision and recall.

Formula sheet

MetricFormulaPurpose
Absolute error|Actual−Predicted|Numerical prediction difference
Error rateAbsolute error/ActualRelative error in house-price activity
Accuracy(TP+TN)/TotalOverall correctness
PrecisionTP/(TP+FP)Reduce false positives
RecallTP/(TP+FN)Reduce false negatives
F12PR/(P+R)Balance precision and recall

Metric selection

Precision

False positive costly: satellite launch safety.

Recall

False negative costly: disease or fraud.

F1

Both error types matter.

Accuracy

Overall correctness is meaningful and classes/errors are suitably balanced.

Diagrams to practise

  1. AI project cycle including Evaluation (page 2).
  2. Train-test split with 8,000/2,000 images (page 3).
  3. Confusion matrix with actual rows and predicted columns (pages 8–9).
  4. TP, TN, FP and FN (pages 12–14).
  5. Unbalanced example TP=900, FP=100, FN=0, TN=0 (pages 15–16).
  6. Bias, Transparency and Accountability (page 21).
Memory guide: Accuracy = overall correctness; Precision = trust positive predictions; Recall = find actual positives; F1 = balance precision and recall.

PDF Coverage and Verification

The uploaded Chapter3.pdf contains 25 pages. Page text and embedded diagrams/tables were reviewed. This coverage map follows the source sequence.

PagesContent covered
1Unit title, summary, objectives, outcomes, prerequisites and key concepts.
2–3Introduction, AI cycle, importance, report-card analogy, train-test split and 8,000/2,000 visual.
4–5Need for split, overfitting, concert example, accuracy/error definitions and disease example.
6All five house-price samples and accuracy calculations.
7–9Classification, supermarket example, use-case question, metrics and confusion matrix visuals.
10–11Activity 2, all ten Yes/No records, matrix construction and reflection.
12–13TP, TN, FP, FN definitions and examples.
14–16Accuracy formula, matrix calculation, accuracy limitations and imbalanced-data activity.
17–19Precision, satellite example, recall, sensitivity/TPR, COVID example, F1 and fraud activity.
20–21Fraud transaction table, recall calculation and ethical-concerns diagram.
21–23Ten MCQs and five Reflection Time questions.
23–24Two assertion–reason questions and metric-selection case study.
24–25Five case studies and metric calculations.

Source inconsistencies corrected transparently

  • MCQ 1 calculates to 96%, but no option matches.
  • MCQ 4 does not give FN or total actual positives; recall cannot be calculated.
  • MCQ 5 calculates to F1=.6667, not present in the options.
  • MCQ 6 calculates to 64.29%; 60% is only the closest printed option.
  • Page 18 says “Precision” at the end of a false-negative discussion; the correct metric is Recall.
  • Case Study 5 repeats TN; its intended value is counted once.

Source diagrams are recreated as responsive HTML diagrams and tables rather than fixed screenshots for mobile readability and print quality.

CBSE Class 10 · Artificial Intelligence · Unit 3: Evaluating Models

TEXTBOOK SOLUTION

Step-by-step solved textbook exercises, derivations, and solutions.

Class 10 AI Unit 3 – Evaluating Models
CBSE · Class 10 · Artificial Intelligence (417)

Unit 3: Evaluating Models

Complete textbook back-exercise solutions · MCQs · Reflection Time · Assertion–Reason · Case Studies

How to use these solutions

Prepared from the uploaded textbook, Unit 3: Evaluating Models, pages 21–25. Answers use simple English suitable for Class 10 students. Numerical questions include formulas, substitutions, calculations and final answers.

Remember the textbook's confusion-matrix layout: Actual values are in rows and predicted values are in columns. TP = top-left, FN = top-right, FP = bottom-left and TN = bottom-right.

1. Test Yourself — Multiple-Choice Questions (Pages 21–23)

Q1. In a medical test for a rare disease, out of 1000 people tested, 50 actually have the disease while 950 do not. The test correctly identifies 40 of the 50 diseased people as positive, but wrongly identifies 30 healthy individuals as positive. What is the accuracy?
A) 97%
B) 90%
C) 85%
D) 70%

TP = 40. Diseased people missed: FN = 50 − 40 = 10. FP = 30. Healthy people correctly identified: TN = 950 − 30 = 920.

Accuracy = (TP + TN) / (TP + TN + FP + FN)
= (40 + 920) / (40 + 920 + 30 + 10)
= 960 / 1000 = 0.96 = 96%
Correct calculation: 96%. None of the printed options matches. The question or options contain a printing error; students should show the calculation rather than select an incorrect option.
Q2. A student solved 90 out of 100 questions correctly. What is the error rate?
A) 10%
B) 9%
C) 8%
D) 11%

Incorrect answers = 100 − 90 = 10.

Error Rate = (Incorrect / Total) × 100
= (10 / 100) × 100 = 10%
Correct answer: A) 10%.
Q3. Out of 1000 emails, 300 are spam. The system correctly identifies 240 spam emails, but also marks 60 legitimate emails as spam. What is precision?
A) 80%
B) 70%
C) 75%
D) 90%

TP = 240; FP = 60.

Precision = TP / (TP + FP)
= 240 / (240 + 60) = 240/300 = 0.8 = 80%
Correct answer: A) 80%. Of all emails predicted as spam, 80% were actually spam.
Q4. A model predicts 70 instances as positive, out of which 50 are actually positive. What is recall?
A) 50%
B) 70%
C) 80%
D) 100%

Given: TP = 50 and predicted positives TP + FP = 70.

The question does not provide enough information to calculate recall. Recall requires the total number of actual positive instances (TP + FN), but FN or the actual-positive total is missing.
Recall = TP / (TP + FN) = 50 / (total actual positives)

50/70 = 71.43% is precision, not recall. If the textbook intended precision, option B (70%) is the approximate choice. As printed, recall cannot be determined.

Q5. A sentiment model correctly predicts 120 positive sentiments out of 200 positive instances. It also incorrectly predicts 40 negative sentiments as positive. Find F1 score.
A) 0.8
B) 0.75
C) 0.72
D) 0.82

TP = 120; FN = 200 − 120 = 80; FP = 40.

Precision = TP/(TP+FP) = 120/160 = 0.75
Recall = TP/(TP+FN) = 120/200 = 0.60
F1 = 2 × Precision × Recall / (Precision + Recall)
= 2 × 0.75 × 0.60 / 1.35
= 0.90 / 1.35 = 0.6667 ≈ 0.67
Correct mathematical answer: approximately 0.67. None of the printed options matches.
Q6. Out of 1000 people, 100 have a disease and the test identifies 90 correctly. It also wrongly identifies 50 healthy people as diseased. Find precision.
A) 90%
B) 80%
C) 70%
D) 60%

TP = 90; FP = 50.

Precision = TP/(TP+FP)
= 90/(90+50) = 90/140 = 0.642857
= 64.29% (approximately)
Correct mathematical answer: approximately 64.3%. No option matches exactly. Option D is nearest, but 60% is not the calculated value.
Q7. Predicted marks = 75; actual marks = 80. Find absolute error.
A) 5
B) 10
C) 15
D) 20
Absolute Error = |Actual − Predicted|
= |80 − 75| = 5
Correct answer: A) 5. Absolute error is always non-negative.
Q8. The goal when evaluating an AI model is to:
A) Maximize error and minimize accuracy
B) Minimize error and maximize accuracy
C) Focus only on number of data points
D) Prioritize model complexity
Correct answer: B) Minimize error and maximize accuracy.

A good model should make more correct predictions and fewer mistakes. The best metric still depends on the task.

Q9. A high F1 score generally suggests:
A) Significant imbalance between precision and recall
B) A good balance between precision and recall
C) Good performance only on selected data
D) Need for more training data
Correct answer: B) A good balance between precision and recall.

F1 score is the harmonic mean of precision and recall. A high F1 score generally means both are reasonably high.

Q10. How is the relationship between model performance and accuracy described?
A) Inversely proportional
B) Not related
C) Directly proportional
D) Randomly fluctuating
Correct answer: C) Directly proportional.

In general, more correct predictions mean higher accuracy and better performance on the evaluated data. Accuracy alone, however, may not be enough for imbalanced datasets.

2. Reflection Time — Descriptive Answers (Page 23)

Q1. What will happen if you deploy an AI model without evaluating it with known test set data?

If an AI model is deployed without evaluation on a separate test dataset, we may not know how well it will perform on new, unseen data. It may appear successful on training examples but produce incorrect predictions in real-world situations.

  1. Unreliable predictions: The model may make mistakes when it receives new data.
  2. Overfitting: It may have memorised training examples instead of learning general patterns, so it performs poorly on unseen data.
  3. Wrong decisions: In healthcare, banking or education, incorrect predictions may lead to harmful decisions.
  4. Unknown weaknesses: Without evaluation metrics, developers may not understand the types of mistakes the model makes.
  5. Loss of trust: Users may lose confidence in an AI system that gives inconsistent results.

Conclusion: A model should be tested before deployment. Evaluation estimates its ability to handle unseen examples and helps developers improve its reliability.

Q2. Do you think evaluating an AI model is essential in an AI project cycle?

Yes. Evaluating an AI model is an essential stage of the AI project cycle because it measures how accurately and reliably the model performs its task. Building or training a model does not guarantee correct real-world results.

  1. Measures performance: Accuracy, precision, recall and F1 score show how well the model performs.
  2. Identifies errors: Evaluation reveals incorrect predictions and weaknesses.
  3. Improves the model: Developers can study the results, make changes and train the model again.
  4. Compares models: It helps select the most suitable model from several alternatives.
  5. Tests unseen data: A separate test set estimates how the model may work on future examples.
  6. Builds trust: Proper evaluation supports reliable and responsible AI systems.

Conclusion: Evaluation gives feedback about a model's strengths and weaknesses and helps improve it before deployment.

Q3. Explain train-test split with an example.

Train-test split is a technique for evaluating a machine-learning algorithm. A dataset is divided into two subsets: a training dataset and a testing dataset.

Training dataset: Used to teach the model. The model studies examples and learns patterns or relationships between inputs and outputs.

Testing dataset: Kept separate during training. After training, its input data is given to the model. The predicted outputs are compared with the actual outputs to measure performance.

Example: Suppose we have 10,000 labelled images for identifying cats and dogs. We can divide them as follows:

DatasetImagesPurpose
Training set8,000 (80%)Model learns patterns from cat and dog images.
Testing set2,000 (20%)Checks how accurately the trained model identifies unseen images.

First, the model learns from 8,000 images. Then, the 2,000 test images are supplied. Predicted labels are compared with actual labels and evaluation metrics are calculated.

Why separate the test set? If training data is also used for evaluation, the model may simply memorise the examples and give an unrealistic performance result. This problem is related to overfitting.

Conclusion: Train-test split estimates how well a model performs on data it has not seen during training. It is suitable when a sufficiently large dataset is available.

Q4. “Understanding both error and accuracy is crucial for effectively evaluating and improving AI models.” Justify this statement.

Understanding both error and accuracy is important because they describe model performance from two viewpoints. Accuracy tells us how many predictions are correct, while error tells us about incorrect predictions or the difference between predicted and actual values.

Accuracy: It measures the number of correct predictions as a proportion of all predictions. Higher accuracy generally indicates better performance on the evaluated data.

Error: It refers to the difference between a model's prediction and the actual result. It helps us understand how often the model makes mistakes or how far its predictions are from actual values.

Importance of both:

  • They help identify strengths and weaknesses.
  • They show whether predictions are reliable.
  • They help developers identify areas that need improvement.
  • They help compare different models.
  • They provide feedback for further training and fine-tuning.

Example: An AI model predicts results for 100 student records. If 90 predictions are correct and 10 are incorrect, its accuracy is 90% and its error rate is 10%. The developer can study the 10 incorrect predictions and improve the model.

Conclusion: Accuracy shows how well a model performs, while error highlights its mistakes. Both are needed for evaluation. For some tasks, precision and recall are also necessary.

Q5. What is classification accuracy? Can it be used all the time for evaluating AI models?

Classification accuracy is the ratio of correct predictions made by a classification model to the total number of predictions. It is usually expressed as a percentage.

Accuracy = Correct Predictions / Total Predictions
= (TP + TN) / (TP + TN + FP + FN)

Example: If a model makes 100 predictions and 80 are correct:

Accuracy = 80/100 = 0.8 = 80%

Can it be used all the time? No. Accuracy may be misleading when the dataset is highly unbalanced or when different mistakes have different consequences.

Example: A dataset has 1,000 transactions: 900 legitimate and 100 fraudulent. A faulty model predicts every transaction as legitimate. It correctly classifies 900 transactions and misses all 100 fraud cases. Its accuracy is 90%, even though it detects no fraud.

In such cases, other metrics are useful:

  • Precision: When False Positives should be reduced.
  • Recall: When False Negatives should be reduced.
  • F1 Score: When a balance between precision and recall is needed.

Conclusion: Accuracy is useful when classes are reasonably balanced and errors have similar importance. It should not be used alone in every situation; the metric must suit the task.

3. Assertion and Reasoning-Based Questions (Pages 23–24)

Q1. Assertion: Accuracy is an evaluation metric that measures the total number of predictions a model gets right. Reason: Accuracy and model performance are directly proportional; better performance means more accurate predictions.

Options: (a) Both true and R correctly explains A. (b) Both true but R does not correctly explain A. (c) A true, R false. (d) A false, R true.

Correct answer: (b) Both A and R are true, but R is not the correct explanation of A.

Explanation: The Assertion is true because accuracy measures the proportion of correct predictions. The Reason is also generally true in the textbook context: better prediction performance is associated with higher accuracy. However, the Reason describes the relationship between accuracy and performance; it does not explain the definition of accuracy in the Assertion.

Q2. Assertion: The sum of values in a confusion matrix's row represents the total number of instances for a given actual class. Reason: This enables calculation of class-specific metrics such as precision and recall, which are essential for evaluating a model across classes.

Options: (a) Both true and R correctly explains A. (b) Both true but R does not correctly explain A. (c) A true, R false. (d) A false, R true.

Correct answer: (b) Both A and R are true, but R is not the correct explanation of A.

Explanation: The Assertion is true because actual values are placed in rows, so adding a row gives the total number of instances in that actual class. The Reason is also true: confusion-matrix values help calculate class-specific metrics. However, it describes a use of the row totals rather than explaining why the row sum represents the total actual instances. With this matrix layout, column totals represent predicted-class totals and are used for precision calculations.

4. Case Study-Based Questions (Pages 24–25)

Q1. Identify whether Precision or Recall should be used in each case and explain why.

(a) Email Spam Detection — Precision (when avoiding false spam flags is the priority). A legitimate email incorrectly marked as spam is a False Positive. Precision focuses on reducing False Positives. High precision means that emails labelled as spam are more likely to actually be spam. If catching every spam email is the main priority, recall also matters.

(b) Cancer Diagnosis — Recall. Missing a patient who actually has cancer is a False Negative. Recall measures the proportion of all actual positive cases correctly identified. High recall helps reduce missed cases and supports timely further medical examination.

(c) Legal Cases (Innocent until proven guilty) — Precision. If “guilty” is the positive class, an innocent person wrongly classified as guilty is a False Positive. Precision focuses on reducing False Positives. AI predictions must never replace proper evidence and due process.

(d) Fraud Detection — Recall. A fraudulent transaction incorrectly classified as legitimate is a False Negative. High recall helps detect as many actual fraud cases as possible. A legitimate transaction wrongly flagged can be reviewed separately.

(e) Safe Content Filtering (such as Kids YouTube) — Recall when the priority is not to miss unsafe content. If unsafe content is the positive class, unsafe material incorrectly allowed as safe is a False Negative. High recall helps reduce the chance of harmful content reaching children. Precision is also important because safe videos should not be wrongly blocked, so a practical system should balance both.

Q2. Draw the confusion matrix and calculate Accuracy, Precision, Recall and F1 Score for each case.

For every case, the positive class is the class marked as “1”. Actual values are rows; predicted values are columns.

Accuracy = (TP + TN) / (TP + TN + FP + FN)
Precision = TP / (TP + FP)
Recall = TP / (TP + FN)
F1 = 2 × Precision × Recall / (Precision + Recall)
Q2 (a). Case Study 1 — Spam email detection

Given TP=150, FP=50, TN=750, FN=50. Total=1000.

Actual / PredictedSpam (1)Not Spam (0)
Spam (1)TP=150FN=50
Not Spam (0)FP=50TN=750

Accuracy: (150+750)/1000 = 900/1000 = 90%.

Precision: 150/(150+50) = 150/200 = 75%.

Recall: 150/(150+50) = 150/200 = 75%.

F1: 2×0.75×0.75/(0.75+0.75) = 1.125/1.5 = 0.75 (75%).

Final: Accuracy 90%; Precision 75%; Recall 75%; F1 0.75.
Q2 (b). Case Study 2 — Credit scoring / loan default prediction

Given TP=90, FP=40, TN=820, FN=50. Total=1000.

Actual / PredictedDefault (1)Not Default (0)
Default (1)TP=90FN=50
Not Default (0)FP=40TN=820

Accuracy: (90+820)/1000 = 910/1000 = 91%.

Precision: 90/(90+40) = 90/130 = 69.23%.

Recall: 90/(90+50) = 90/140 = 64.29%.

F1: 2×0.6923×0.6429/(0.6923+0.6429) ≈ 0.6667 (66.67%).

Final: Accuracy 91%; Precision 69.23%; Recall 64.29%; F1 0.67.
Q2 (c). Case Study 3 — Fraud detection system

Given TP=80, FP=30, TN=850, FN=40. Total=1000.

Actual / PredictedFraud (1)Legitimate (0)
Fraud (1)TP=80FN=40
Legitimate (0)FP=30TN=850

Accuracy: (80+850)/1000 = 930/1000 = 93%.

Precision: 80/(80+30) = 80/110 = 72.73%.

Recall: 80/(80+40) = 80/120 = 66.67%.

F1: 2×0.7273×0.6667/(0.7273+0.6667) ≈ 0.6957 (69.57%).

Final: Accuracy 93%; Precision 72.73%; Recall 66.67%; F1 0.70.
Q2 (d). Case Study 4 — Medical diagnosis system

Given TP=120, FP=20, TN=800, FN=60. Total=1000.

Actual / PredictedDisease (1)No Disease (0)
Disease (1)TP=120FN=60
No Disease (0)FP=20TN=800

Accuracy: (120+800)/1000 = 920/1000 = 92%.

Precision: 120/(120+20) = 120/140 = 85.71%.

Recall: 120/(120+60) = 120/180 = 66.67%.

F1: 2×0.8571×0.6667/(0.8571+0.6667) = 0.75 (75%).

Final: Accuracy 92%; Precision 85.71%; Recall 66.67%; F1 0.75.
Q2 (e). Case Study 5 — Inventory management / out-of-stock prediction

Given TP=100, FP=50, TN=800, FN=50. Total=1000. The textbook repeats the TN statement; TN=800 is counted once.

Actual / PredictedOut of Stock (1)Not Out of Stock (0)
Out of Stock (1)TP=100FN=50
Not Out of Stock (0)FP=50TN=800

Accuracy: (100+800)/1000 = 900/1000 = 90%.

Precision: 100/(100+50) = 100/150 = 66.67%.

Recall: 100/(100+50) = 100/150 = 66.67%.

F1: 2×0.6667×0.6667/(0.6667+0.6667) = 0.6667 (66.67%).

Final: Accuracy 90%; Precision 66.67%; Recall 66.67%; F1 0.67.

Q2 — Final answer comparison

CaseAccuracyPrecisionRecallF1 Score
1. Spam detection90%75%75%0.75
2. Credit scoring91%69.23%64.29%0.67
3. Fraud detection93%72.73%66.67%0.70
4. Medical diagnosis92%85.71%66.67%0.75
5. Inventory management90%66.67%66.67%0.67

5. Important Formula Sheet for Revision

MetricFormulaMeaning
Absolute Error|Actual − Predicted|Magnitude of difference between actual and predicted values.
Error RateIncorrect predictions / Total predictionsFraction of predictions that are wrong.
Accuracy(TP + TN) / (TP + TN + FP + FN)Fraction of all predictions that are correct.
PrecisionTP / (TP + FP)Of predicted positives, how many are actually positive?
RecallTP / (TP + FN)Of actual positives, how many did the model identify?
F1 Score2 × Precision × Recall / (Precision + Recall)Harmonic mean of precision and recall.

Confusion matrix — four terms

Actual / PredictedPositiveNegative
PositiveTrue Positive (TP)
Correct positive prediction
False Negative (FN)
Actual positive missed
NegativeFalse Positive (FP)
Actual negative wrongly marked positive
True Negative (TN)
Correct negative prediction

Which metric should be selected?

  • Precision: When False Positives are costly and should be reduced.
  • Recall: When False Negatives are costly and should be reduced.
  • F1 Score: When a balance between precision and recall is needed.
  • Accuracy: When classes are reasonably balanced and the two types of error have similar importance.

6. Ethical Concerns in Model Evaluation (Page 21)

The textbook highlights three ethical concerns:

  1. Bias: Ensure that the evaluation metrics and test data do not produce biased results against any group or individual.
  2. Transparency: Explain honestly how the selected metrics work and how the results are produced. Do not hide important information.
  3. Accountability: The people selecting the metrics and evaluation method must take responsibility for their choices and the effects of the system.
Exam-ready conclusion: Responsible model evaluation should be fair, transparent and accountable. It should measure performance honestly and help prevent biased or harmful decisions.

7. Textbook Coverage and Important Clarifications

This solution set covers the written exercise at the end of the uploaded PDF:

  • Pages 21–23: all 10 Test Yourself MCQs.
  • Page 23: all 5 Reflection Time questions.
  • Pages 23–24: both Assertion–Reason questions.
  • Pages 24–25: Case Study Q1 (five scenarios) and Case Study Q2 (five numerical cases).

Source-based clarifications:

  • MCQ 1: the supplied values give 96% accuracy, but none of the options matches.
  • MCQ 4: the question gives predicted positives and true positives, enough for precision but not recall. The actual-positive total is missing.
  • MCQ 5: the supplied data give F1 ≈ 0.67, not one of the options.
  • MCQ 6: the supplied data give precision ≈ 64.3%, not an exact listed option.
  • Case Study 5: the textbook repeats the TN line. TN=800 is counted once.

Where the source contains missing information or inconsistent options, the solutions preserve the supplied data and identify the issue instead of silently changing the question.

Class 10 Artificial Intelligence (417) · Unit 3: Evaluating Models
Back to top ↑

IMPORTANT QUESTION

High-yield board questions, previous year questions (PYQs), and model answer keys.

Important Questions Being Compiled

Board blueprint and previous years' exam questions for this chapter will be live soon.