Evaluation-1 Flashcards
what is reliability
Evaluation is the process of understanding the reliability of any AI model, based on outputs by feeding the test data set into the model and comparing with actual answers.
why us model evaluation importiannt
Model Evaluation is an integral part of the model development process. It helps to find the best model that represents our data and how well the chosen model will work in the future.
define undeffittig
In the first diagram,The model’s output does not match the true function at all. Hence the model is said to be underfitting and its accuracy is lower.
define overfitting
When we use the same data we used to build the model for evaluaion,the model will simply remember the whole training set, and will therefore always gives correct prediction. This is known as overfitting.
In the third case, model performance is trying to cover all the data samples even if they are out of alignment to the true function. This model is said to be overfitting and this too has a lower accuracy.
what is a perfect fit
the model’s performance matches well with the true function which states that the model has optimum accuracy and the model is called a perfect fit.
what is
i) prediction
ii) reality
i) prediction is the output that is given by the machine
ii) reality is the true scenario wich takes place for which the prediction was made.
what is a confusion matrix?
it table setup which Helps to understand the prediction results. It shows the comparison between the prediction and reality .This is sometimes referred to as Contingency table or error matrix or matching matrix.
A 2x2 matrix denoting the right and wrong predictions might help us analyse the rate of success. This matrix is termed the Confusion Matrix.
what is true positive
The predicted value matches the actual value
The actual value was positive and the model predicted a positive value
what is true negative
The predicted value matches the actual valueThe actual value was negative and the model predicted a negative value
what is false positive
The predicted value was falsely predictedThe actual value was negative but the model predicted a positive valueAlso known as the Type 1 error
what is false negative
The predicted value was falsely predictedThe actual value was positive but the model predicted a negative valueAlso known as the Type 2 error
what are the 4 evaluation meaures
-accuracy
-precision
-recall
-F1 score
define accurucay
Accuracy is defined as the percentage of correct predictions out of all the observations. A prediction can be said to be correct if it matches the reality. Here, we have two conditions in which the Prediction matches with the Reality: True Positive and True Negative.
accuracy= correct predicitoon/total case x 100
=tp+tn/tp+tn+fp+fn x 100
why is accuracy not a good measure
Assume that the model always predicts that there is no fire. But in reality, there is a 2% chance of forest fire breaking out. In this case, for 98 cases, the model will be right but for those 2 cases in which there was a forest fire, then too the model predicted no fire.
Here,
True Positives = 0
True Negatives = 98
Total cases = 100
Therefore, accuracy becomes: (98 + 0) / 100 = 98%
This is a fairly high accuracy for an AI model. But this parameter is useless for us as the actual cases where the fire broke out are not taken into account. Hence, there is a need to look at another parameter which takes account of such cases as well.
define precision
Precision is defined as the percentage of true positive cases versus all the cases where the prediction is true. That is, it takes into account the True Positives and False Positives.
precision= tru positive/ all predicted positivies x 100
= tp/tp+fp x 100