Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Scenario 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Scenario 1:

Find out Accuracy, Precision, Recall and F1 Score for the given problems.
In schools, a lot of times it happens that there is no water to drink. At a
few places, cases of water shortage in schools are very common and
prominent. Hence, an AI model is designed to predict if there is going to
be a water shortage in the school in the near future or not. The confusion
matrix for the same is:

The confusion matrix Reality:1 Reality:0

Predicted:1 22 12

Predicted:0 47 118

Solution:

Confusion Matrix Breakdown:

True Positives (TP): 22 (Predicted 1, Reality 1)

False Positives (FP): 12 (Predicted 1, Reality 0)

False Negatives (FN): 47 (Predicted 0, Reality 1)

True Negatives (TN): 118 (Predicted 0, Reality 0)


Scenario 2:

Nowadays, the problem of floods has worsened in some parts of the


country. Not only does it damage the whole place but it also forces people
to move out of their homes and relocate. To address this issue, an AI
model has been created which can predict if there is a chance of floods or
not. The confusion matrix for the same is:

The confusion matrix Actual:1 Actual:0

Predicted:1 0 3

Predicted:0 3 94
Solution:

From this matrix, we can define the terms:

 True Positives (TP): The number of instances where the model


correctly predicted a flood (Actual: 1, Predicted: 1) = 0

 True Negatives (TN): The number of instances where the model


correctly predicted no flood (Actual: 0, Predicted: 0) = 94

 False Positives (FP): The number of instances where the model


incorrectly predicted a flood (Actual: 0, Predicted: 1) = 3

 False Negatives (FN): The number of instances where the model


incorrectly predicted no flood (Actual: 1, Predicted: 0) = 3
Summary of Metrics

 Accuracy: 94%

 Precision: 0%

 Recall: 0%

 F1 Score: 0

Conclusion

The model has high accuracy mainly due to the high number of true
negatives (correctly predicting no flood). However, it completely fails to
predict any actual floods (true positives), leading to a precision and recall
of 0%. This indicates that while the model may be good at identifying non-
flood conditions, it is ineffective in predicting flood occurrences, which is
critical for the intended application.

Improvements in the model may be necessary to increase its ability to


identify flood events accurately.

Scenario 3:

A lot of times people face the problem of sudden downpour. People wash
clothes and put them out to dry but due to unexpected rain, their work
gets wasted. Thus, an AI model has been created which predicts if there
will be rain or not. The confusion matrix for the same is:

The confusion matrix Actual:1 Actual:0

Predicted:1 5 0

Predicted:0 45 50

Solution:

 True Positives (TP): 5 (Predicted 1, Actual 1)


 False Positives (FP): 0 (Predicted 1, Actual 0)
 False Negatives (FN): 45 (Predicted 0, Actual 1)
 True Negatives (TN): 50 (Predicted 0, Actual 0)
Summary of Metrics:

 Accuracy: 0.55 (55%)

 Precision: 1 (100%)

 Recall: 0.1 (10%)

 F1 Score: 0.1818 (18.18%)

Conclusion:
The AI model has perfect precision, meaning when it predicts rain, it is
always correct. However, the recall is quite low, indicating that the model
fails to identify a significant number of actual rainy days (only 10%). The
overall accuracy is also moderate at 55%. The F1 Score reflects this
imbalance, demonstrating a trade-off between precision and recall.

Scenario 4:

Find out Accuracy, Precision, Recall and F1 Score for the given problems.
Traffic Jams have become a common part of our lives nowadays. Living in
an urban area means you have to face traffic each and every time you get
out on the road. Mostly, school students opt for buses to go to school.
Many times the bus gets late due to such jams and students are not able
to reach their school on time. Thus, an AI model is created to predict
explicitly if there would be a traffic jam on their way to school or not. The
confusion matrix for the same is

The confusion matrix Reality:1 Reality:0

Predicted:1 50 50

Predicted:0 0 0

Solution:

Values from the Confusion Matrix

 True Positives (TP) = 50

 True Negatives (TN) = 0

 False Positives (FP) = 50

 False Negatives (FN) = 0


Summary of Metrics

 Accuracy: 0.5 (or 50%)

 Precision: 0.5 (or 50%)

 Recall: 1.0 (or 100%)

 F1 Score: 0.67 (or approximately 67%)


Conclusion:

The AI model shows an accuracy of 50%, indicating that half of its predictions were correct.
The precision is also 50%, meaning half of the predicted traffic jams were actual traffic jams.
The recall is perfect at 100%, indicating that all actual traffic jams were correctly identified
by the model. The F1 Score reflects a balance between precision and recall, showing
reasonable performance in identifying traffic jams.

You might also like