powered by
Refits a model over a sequence of hyperparameter values and returns a gganimate object showing the boundary change.
gganimate
morph_boundary( x, y, param = c("gamma", "cost", "c1"), range, model = c("tsvm", "svms"), n = 30, ... )
A gganim object.
gganim
Numeric two-column matrix or data frame.
Two-class response.
Hyperparameter to vary.
Numeric length-two range for the hyperparameter.
Model family: "tsvm" or "svms".
"tsvm"
"svms"
Number of frames.
Additional arguments passed to the model fit function.
# \donttest{ if (interactive()) { dat <- gen_moons(40) morph_boundary(dat$x, dat$y, param = "gamma", range = c(0.5, 2), n = 4) } # }
Run the code above in your browser using DataLab