| morph_boundary | R Documentation |
Refits a model over a sequence of hyperparameter values and returns a
gganimate object showing the boundary change.
morph_boundary(
x,
y,
param = c("gamma", "cost", "c1"),
range,
model = c("tsvm", "svms"),
n = 30,
...
)
x |
Numeric two-column matrix or data frame. |
y |
Two-class response. |
param |
Hyperparameter to vary. |
range |
Numeric length-two range for the hyperparameter. |
model |
Model family: |
n |
Number of frames. |
... |
Additional arguments passed to the model fit function. |
A gganim object.
if (interactive()) {
dat <- gen_moons(40)
morph_boundary(dat$x, dat$y, param = "gamma", range = c(0.5, 2), n = 4)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.