| compare_methods | R Documentation |
Fits least-squares twin SVM, original QP twin SVM, and the standard C-SVC SVM baseline on the same two-dimensional data, then plots the three decision boundaries side by side.
compare_methods(x, y, kernel = "rbf", gamma = 0.5, c1 = 1, c2 = 1, cost = 1)
x |
Numeric two-column matrix or data frame. |
y |
Two-class response. |
kernel |
Kernel name: |
gamma |
Kernel scale. |
c1, c2 |
Positive twin-SVM regularization parameters. |
cost |
Positive C-SVC cost parameter. |
A faceted ggplot object.
Other visualization:
kernel_lift(),
lift_plot(),
lift_plotly()
set.seed(30)
dat <- gen_moons(50, noise = 0.1)
compare_methods(dat$x, dat$y, gamma = 1, c1 = 0.2, c2 = 0.2, cost = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.