| Prediction | Prediction | ||
|---|---|---|---|
P |
N |
||
Truth |
P |
TP |
FN |
Truth |
N |
FP |
TN |
-
Accuracy:
(TP+TN)/(TP+FP+FN+TN) -
Precision:
TP/(TP+FP) -
Recall:
TP/(TP+FN)
Accuracy = correctly classified instances / total amount of classified instances Error = 1 - Accuracy
Goal: end up with pure leafs — leafs that contain observations of one particular class. At each node iterate over different feature tests and choose the best. Use spliting criteria to decide which test to use. The best test leads to nicely divided classes → high information gain
Pruning tree restricts node size = higher bias = lower overfit chance.
-
Root Mean Squared Error (RMSE)
-
R-squared
-
Adjusted R-squared: penalizes more predictors
-
p-values: low p-values = parameter has significant influence
-
Simple linear: 1 predictor (with approximately linear relationship) to model the response
-
Multi-linear: Higher predictive power and accuracy = Lower RMSE and higher R-squared
-
Ridge Regression is a technique for analyzing multiple regression data that suffer from multicollinearity.
-
It reduces the standard errors.
-
It adds penalty equivalent to square of the magnitude of coefficients
-
-
Grouping objects in clusters
-
WSS keeps decreasing as k increases → Find k that minimizes WSS
TSS = WSS + BSS WSS / TSS < 0.2
-
Prediction error = reducible + irreducible error
-
Reducible error = Bias & Variance
Error due to bias = Wrong assumption = diff(prediction, truth) = complexity of model More model restrictions = high bias = low variance = underfitting
Error due to variance = error due to the sampling of the training set Model fits training set closely = high variance = low bias = overfitting