SVM - Knowledge Representation
library(rattle)
## Warning: package 'rattle' was built under R version 4.2.1
## Loading required package: tibble
## Loading required package: bitops
## Rattle: A free graphical interface for data science with R.
## Version 5.5.1 Copyright (c) 2006-2021 Togaware Pty Ltd.
## Type 'rattle()' to shake, rattle, and roll your data.
obs <- with(weather, Pressure3pm+Sunshine > 1032 |
(Pressure3pm+Sunshine < 1020 &
RainTomorrow == "Yes"))
ds <- weather[obs, ]
with(ds, plot(Pressure3pm, Sunshine,
pch=as.integer(RainTomorrow),
col=as.integer(RainTomorrow)+1))
lines(c(1016.2, 1019.6), c(0, 12.7))
lines(c(1032.8, 1001.5), c(0, 12.7))
legend("topleft", c("Yes", "No"), pch=2:1, col=3:2)
