View source: R/autoplot_spatial_initial_split.R
autoplot.spatial_initial_split | R Documentation |
This method provides a good visualization method for a spatial initial rsplit.
## S3 method for class 'spatial_initial_split'
autoplot(object, ..., alpha = 0.6)
object |
A |
... |
Options passed to |
alpha |
Opacity, passed to |
This plot method is a wrapper around the standard spatial_rsplit
method,
but it re-labels the folds as Testing and Training following the
convention for a standard initial_split
object
A ggplot object with each fold assigned a color, made using
ggplot2::geom_sf()
.
set.seed(123)
block_initial <- spatial_initial_split(boston_canopy,
prop = 1 / 5, spatial_block_cv
)
autoplot(block_initial)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.