Description Usage Arguments References See Also Examples
Displays the peeling trajectory of a prim
object with chosen
cut-points.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
object |
A |
xtype |
A character indicating the how to display the x axis of the plot. 'support' (the default) for the support of the boxes or 'nobs' for the number of observations inside the box. |
ytype |
A character indicating which trajectory to plot. 'yfun'
(the default) for the objective function value, 'diff' for the
difference between successive boxes and 'rel.diff' for the relative
difference. See |
npeel |
Integer vector. If not |
support |
Numeric vector. If not |
yfun |
Numeric vector. If not |
npaste |
Integer vector. If not |
abline.pars |
List of parameters to be passed to
|
se |
Logical indicating if standard error bars should be drawn.
Works only for |
se.pars |
Parameters to be passed to |
... |
Additional graphical parameters for
|
Friedman, J.H., Fisher, N.I., 1999. Bump hunting in high-dimensional data. Statistics and Computing 9, 123-143. https://doi.org/10.1023/A:1008894516817
peeling
for peeling trajectories.
1 2 3 4 5 6 7 8 9 10 11 12 | # A simple bump
set.seed(12345)
x <- matrix(runif(2000), ncol = 2, dimnames = list(NULL, c("x1", "x2")))
y <- 2 * x[,1] + 5 * x[,2] + 10 * (x[,1] >= .8 & x[,2] >= .5) +
rnorm(1000)
# Peeling with alpha = 0.05 and beta.stop = 0.05
peel_res <- peeling(y, x, beta.stop = 0.05)
# Display the peeling trajectory
plot_trajectory(peel_res, type = "b", pch = 16, col = "cornflowerblue",
support = 0.11, abline.pars = list(lwd = 2, col = "indianred"),
xlab = "")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.