Update page 'Solutions to the questions concerning R language'

xuanyi.wang
2023-05-22 21:06:14 +02:00
parent 9bc46f01b5
commit bda8e91291
+2 -1
@@ -438,9 +438,10 @@ plot(x1, x2, col = colors, xlim = c(0, 5), ylim = c(0, 5))
**ii.** **ii.**
The maximal margin classifier has to be in between observations #2, #3 and #5, #6. The maximal margin classifier has to be in between observations #2, #3 and #5, #6.
```
(2,2),(4,4) (2,2),(4,4)
(2,1),(4,3) (2,1),(4,3)
=>(2,1.5),(4,3.5) =>(2,1.5),(4,3.5)
b=(3.5−1.5)/(4−2)=1 b=(3.5−1.5)/(4−2)=1
a=X2−X1=1.5−2=−0.5 a=X2−X1=1.5−2=−0.5
```