Update page 'Questions concerning R language'

xuanyi.wang
2023-05-22 20:36:57 +02:00
parent 06c1fa0d0a
commit 840748e247
+4 -2
@@ -1,4 +1,5 @@
***Applied*** ***Applied Question***
This problem involves the `OJ` data set which is part of the `ISLR` package. This problem involves the `OJ` data set which is part of the `ISLR` package.
* Create a training set containing a random sample of 800 observations, and a test set containing the remaining observations. * Create a training set containing a random sample of 800 observations, and a test set containing the remaining observations.
* Fit a support vector classifier to the training data using `cost=0.01`, with `Purchase` as the response and the other variables as predictors. Use the `summary()` function to produce summary statistics, and describe the results obtained. * Fit a support vector classifier to the training data using `cost=0.01`, with `Purchase` as the response and the other variables as predictors. Use the `summary()` function to produce summary statistics, and describe the results obtained.
@@ -9,7 +10,8 @@ This problem involves the `OJ` data set which is part of the `ISLR` package.
* Repeat parts (ii) through (v) using a support vector machine with a polynomial kernel. Set `degree=2`. * Repeat parts (ii) through (v) using a support vector machine with a polynomial kernel. Set `degree=2`.
* Overall, which approach seems to give the best results on this data? * Overall, which approach seems to give the best results on this data?
***Conceptual*** ***Conceptual Question***
Here we explore the maximal margin classifier on a toy data set. Here we explore the maximal margin classifier on a toy data set.
* We are given n = 7 observations in p = 2 dimensions. For each observation, there is an associated class label. * We are given n = 7 observations in p = 2 dimensions. For each observation, there is an associated class label.
| Obs. | X1 | X2 | Y | | Obs. | X1 | X2 | Y |