powered by
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)
A faceted ggplot object.
ggplot
Numeric two-column matrix or data frame.
Two-class response.
Kernel name: "linear", "rbf", or "poly".
"linear"
"rbf"
"poly"
Kernel scale.
Positive twin-SVM regularization parameters.
Positive C-SVC cost parameter.
Other visualization: kernel_lift(), lift_plot(), lift_plotly()
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)
Run the code above in your browser using DataLab