asadoughi / stat-learning

Notes and exercise attempts for "An Introduction to Statistical Learning"
http://asadoughi.github.io/stat-learning
2.13k stars 1.62k forks source link

Chapter 9 Question 7 #107

Open s17k opened 4 years ago

s17k commented 4 years ago

It is not mentioned in the task statement explicitly, but I think it is implied that mpg should be excluded as a predictor. The solution proposed here uses mpg as a predictor for the mpglevel, which makes this model completely useless (as if we knew mpg, then there would be a much simpler solution for getting mpglevel)

leowang396 commented 4 years ago

agreed.

With the understanding that mpg should not be part of the input, I'm also wondering how to approach part (d) of the question? My solution is to plot pairwise plots between each predictors to visualize their relationship. From my plots, the relationships look either linear or only slightly non-linear, which supports the slightly better performances by SVMs. The contour plots for class regions on 2-D plot are not informative perhaps due to the high dimensions of the input.