Learn R Programming

twinsvm (version 0.0.1)

lift_plot: Static RBF Kernel Lift Plot

Description

Maps two-dimensional data to a third RBF height and draws a static oblique projection. The height is exp(-gamma * ||x - center||^2), so points near the center rise while points farther away stay low. A translucent plane is drawn halfway between the two class mean heights.

Usage

lift_plot(x, y, gamma = 1, center = NULL)

Value

A ggplot object.

Arguments

x

Numeric two-column matrix or data frame.

y

Two-class response.

gamma

Positive RBF scale.

center

Optional numeric length-two center for the RBF bump. If NULL, the centroid of the inner class is used.

See Also

Other visualization: compare_methods(), kernel_lift(), lift_plotly()

Examples

Run this code
set.seed(20)
dat <- gen_circles(80, noise = 0.04)
lift_plot(dat$x, dat$y, gamma = 1)

Run the code above in your browser using DataLab