In the case of classification with linear regression: (i) fit a linear model on the response values 2 and 3, (ii) use a classification rule that assigns class 2 if the predicted response is less than 2.5, and class 3 otherwise. In R, you can use the function \(\texttt{lm()}\) for linear regression and the \(\texttt{knn()}\) function from the R package \(\texttt{class}\).
Hints for problem 2.8
Published Aug. 7, 2025 11:12 AM
- Last modified Aug. 7, 2025 11:12 AM