Prediction Flashcards
Classification
Predicting when y=1 vs 0 (like churn). Tells you probability of y=1
Unconditional Probability
Unaffected by previous or future events
Law of Large Numbers
Increased observations means increased precision of prediction
Conditional Probability
Stronger prediction, rather than just 25% of customers churn you divide churn rate by senior and not senior
Bayes Rule
P(A|B) = P(A&B)/P(B)
P(A|B) = P(A)P(B)/P(B)
Threshold
Value between 0 and 1. The value for probability that will mean it is considered a 1
Sigmoid Function
H= @ + @ * tenure and then L(H) = 1/(1+e^-H)
gets you those predictions on multiple variables
Certainty through |H|
|H|> 2 okay
|H|> 5 quite sure
|H| > 10 super sure
Scatter Plotting Continuous Features
A method to analyze how your y value is affected by both. have feature 1 on the x, feature 2 on the y, and then two colours for whether each data point is y=1
Precision
How many false positives, if higher than less Fp
Tp/(Tp + Fp)
Accuracy
How many correct predictions (so true positives and true negatives)
(Tp + Tn)/(all obs)
Recall
How many false negatives, if higher than less Fn
Tp/(Tp+Fn)
F1
Balance between precision and recall
2((PR)/(P + R))
Underfitting
Model bad in testing, not flexible enough
High bias
Add observations or add features