Update page 'Solutions to the questions concerning R language'

xuanyi.wang
2023-05-22 21:05:57 +02:00
parent fef289b574
commit 9bc46f01b5
@@ -425,3 +425,22 @@ Tuning reduces the training error to 15.12% and test error to 17.4% which is wor
**viii.** **viii.**
Overall, radial basis kernel seems to be producing minimum misclassification error on both train and test data. Overall, radial basis kernel seems to be producing minimum misclassification error on both train and test data.
***Conceptual Question***
**i. **
```
x1 = c(3, 2, 4, 1, 2, 4, 4)
x2 = c(4, 2, 4, 4, 1, 3, 1)
colors = c("red", "red", "red", "red", "blue", "blue", "blue")
plot(x1, x2, col = colors, xlim = c(0, 5), ylim = c(0, 5))
```
**ii.**
The maximal margin classifier has to be in between observations #2, #3 and #5, #6.
(2,2),(4,4)
(2,1),(4,3)
=>(2,1.5),(4,3.5)
b=(3.5−1.5)/(4−2)=1
a=X2−X1=1.5−2=−0.5