SUPERVISED Flashcards
what is generalization?
Amodel’sability to make correct predictions on new, previously unseen data.
what does generalization refers to?
the model’s capability to adapt and react properly to previously unseen, new data that has the same characteristics as the training set
generalizationexamines how well a model can digest new data and make correct predictions after getting trained on a training set.
what is bias?
If your predictions are consistently off by a certain amount, that’s bias. For example, if you always predict that plants will grow taller than they actually do, you’ve got a bias issue.
what is variance?
is all about inconsistency. If you make predictions that swing wildly from one extreme to another, that’s high variance. For instance, if one day you predict a plant will be super tall and the next day you say it’ll be super short, you’ve got a variance problem.
what is a high bias model?
If your predictions are consistently off by a certain amount, that’s bias. A high-bias model doesn’t adapt well to new information; it’s stuck in its ways.
what is a high variance model?
If you make predictions that swing wildly from one extreme to another, that’s high variance. A high-variance model is too sensitive to small changes in the data; it overreacts.
what is the perfect model for generalization?
low-bias and low-variance
what is overfitting?
If your model learns too much from the data you give it, it might do great on the examples it’s seen but not so great on new ones it hasn’t seen.
when we train a overfit model what happens?
An overfit model gets a low loss during training but does a poor job predicting new data.
what is underfitting?
It happens when your model is too simple to capture the underlying patterns in the data. It’s like trying to fit a straight line to data that’s actually a curve.
how to improve a overfit model?
by making sure you have enough diverse examples to learn from and using techniques that help your model focus on the big picture.
how to improve a underfit model?
you need to make sure your model is complex enough to capture the important patterns in the data. You might need more features or a more sophisticated model.
what is confusion matrix?
confusion matrix is just a way to organize these results into a table. It helps you see how well your program is doing overall and where it might need improvement. The goal is to have as many true positives and true negatives as possible, and as few false positives and false negatives as possible.
what is true positive?
the model correctly predicts the positive class.
what is true negative?
the model correctly predicts the negative class.
what is false positive?
the model incorrectly predicts the positive class.
what is false negative?
the model incorrectly predicts the negative class.
what is F-1 score?
2 x precision x recall/ precision + recall
what is ROC
receiver operating curve
define ROC
is like a graph that shows how well a classification model performs. It helps us see how the model makes decisions at different levels of certainty.
how does ROC plot the graph
The ROC curve is like a plot that helps you understand this. Here’s how:
True Positive Rate (Sensitivity): This is like how good your program is at correctly telling you to bring an umbrella when it’s actually going to rain. It’s the proportion of rainy days that your program correctly predicts.
False Positive Rate: This is like how often your program tells you to bring an umbrella when it’s not going to rain. It’s the proportion of non-rainy days that your program incorrectly predicts as rainy.
The ROC curve plots the True Positive Rate (Sensitivity) against the False Positive Rate.
what is AUC?
Area Under the Curve
what does AUC indicate?
the higher the AUC, the better the model’s performance at distinguishing between the positive and negative classes
what happens when AUC=1
the classifier can correctly distinguish between all the Positive and the Negative class points
what happens when AUC=0
then the classifier would predict all Negatives as Positives and all Positives as Negatives.
In a binary classification problem, False Negatives (FN) are:
a) Cases where the model incorrectly predicts a negative outcome when the true outcome is negative.
b) Cases where the model incorrectly predicts a negative outcome when the true outcome is positive.
c) Cases where the model correctly predicts a negative outcome.
d) Cases where the model incorrectly predicts a positive outcome when the true outcome is positive.
True Positives (TP) represent:
a) Cases where the model correctly predicts a positive outcome.
b) Cases where the model incorrectly predicts a positive outcome when the true outcome is negative.
c) Cases where the model correctly predicts a negative outcome.
d) Cases where the model incorrectly predicts a negative outcome when the true outcome is positive.
How can False Positives (FP) be calculated?
a) Number of actual positive instances - Number of true positive instances
b) Number of actual negative instances - Number of true negative instances
c) Number of actual negative instances - Number of false negative instances
d) Number of actual positive instances - Number of false negative instances
What do True Negatives (TN) represent?
a) Cases where the model incorrectly predicts a positive outcome when the true outcome is negative.
b) Cases where the model incorrectly predicts a negative outcome when the true outcome is positive.
c) Cases where the model correctly predicts a negative outcome.
d) Cases where the model correctly predicts a positive outcome.
If the number of actual positive instances is 100 and the number of true positive instances is 80, what is the number of False Negatives (FN)?
a) 20
b) 80
c) 100
d) 0
True or False: True Negatives (TN) represent cases where the model incorrectly predicts a positive outcome when the true outcome is negative.
a) True
b) False
what is data
it comes in the form of words and numbers stored in tables, or as values of pixels and waveforms captured in audios and videos
what are datasets made up of
features and labels
what are features
Features are the values that a supervised model uses to predict the label.
what is a label
The label is the “answer,” or the value we want the model to predict.
what are labelled examples?
which contain both features and labels
how is a dataset characterized?
and the basis of size and diversity
which is a good dataset
a good data set is the one with both large in size and highly diverse
what is a model
a model is the complex collection of numbers that define the mathematical relationship from specific input feature patterns to specific output label values.
how is a model trained
Before a supervised model can make predictions, it must be trained. To train a model, we give the model a dataset with labeled examples. The model’s goal is to work out the best solution for predicting the labels from the features.
what is loss
The model finds the best solution by comparing its predicted value to the label’s actual value. Based on the difference between the predicted and actual values—defined as theloss.
why does a model need to be trained?
A model needs to be trained to learn the mathematical relationship between the features and the label in a dataset.
what is evaluating
we evaluate a model to see how well it learned
to do so we we use a labelled dataset but we only give the model the dataset’s features. We then compare the model’s predictions to the label’s true values.
what is inference
Once we’re satisfied with the results from evaluating the model, we can use the model to make predictions, calledinferences on unlabelled examples
formula for accuracy?
TP+TN / TP+TN+FP+FN
formula for precision?
TP/TP+FN
formula for recall?
TP/TP+FN
formula for specificity
TN/TN+FP
how many line ROC have?
two
one for how often the model correctly identifies positive cases (true positives) and another for how often it mistakenly identifies negative cases as positive (false positives).
what is correlation
statistical relationship between two variables
what happens when correlation is 0
no correlation
what happens when correlation is +1
positive correlation
what happens when correlation is -1
negative correlation
R-squared 0 ?
none of the label’s variance is due to the feature set
R-squared 1?
all of the label’s variance is due to feature set
R-squared between 0-1?
label’s variation can be predicted from a particular feature or the feature set.