3. lambdas where we have 3 features: 0.8530452 0.7772630 0.7082131
4. No coefficients become 0
5. Optimal lambda = 0.05744535, 8 variables
CV-score gets lower with lower lambda
Optimal lambda is not statistically significantly better than lamda = log(-4)
Quite good, we can see a trend.
## Assignment 2
2. Values in Rstudio
3. We get underfitting for small trees however we can still get good for validation due to it working as a regularization, we generalize well
High bias -> underfittning, high variance -> overfitting. We find the best amount of leaves when we balance bias and variance and minimising the deviance.
4. F1 better since very imbalanced
5. More likely to choose no, needs to be 5 times more sure of yes than no to select yes
6. Tree a little bit better, precision recall would be better since imbalanced classes.
Since we have a big imbalance, FPR is not even 50% for pi = 0.05.