autoplot.ResamplingSpCVTiles {mlr3spatiotempcv} | R Documentation |
Visualization Functions for SpCV Tiles Method.
Description
Generic S3 plot()
and autoplot()
(ggplot2) methods to
visualize mlr3 spatiotemporal resampling objects.
Usage
## S3 method for class 'ResamplingSpCVTiles'
autoplot(
object,
task,
fold_id = NULL,
plot_as_grid = TRUE,
train_color = "#0072B5",
test_color = "#E18727",
repeats_id = NULL,
show_omitted = FALSE,
sample_fold_n = NULL,
...
)
## S3 method for class 'ResamplingRepeatedSpCVTiles'
autoplot(
object,
task,
fold_id = NULL,
repeats_id = 1,
plot_as_grid = TRUE,
train_color = "#0072B5",
test_color = "#E18727",
show_omitted = FALSE,
sample_fold_n = NULL,
...
)
## S3 method for class 'ResamplingSpCVTiles'
plot(x, ...)
## S3 method for class 'ResamplingRepeatedSpCVTiles'
plot(x, ...)
Arguments
object |
|
task |
|
fold_id |
|
plot_as_grid |
|
train_color |
|
test_color |
|
repeats_id |
|
show_omitted |
|
sample_fold_n |
|
... |
Passed to |
x |
|
Details
Specific combinations of arguments of "spcv_tiles"
remove some
observations, hence show_omitted
has an effect in some cases.
See Also
mlr3book chapter on "Spatial Analysis"
Vignette Spatiotemporal Visualization.
Examples
if (mlr3misc::require_namespaces(c("sf", "sperrorest"), quietly = TRUE)) {
library(mlr3)
library(mlr3spatiotempcv)
task = tsk("ecuador")
resampling = rsmp("spcv_tiles",
nsplit = c(4L, 3L), reassign = FALSE)
resampling$instantiate(task)
autoplot(resampling, task,
fold_id = 1,
show_omitted = TRUE, size = 0.7) *
ggplot2::scale_x_continuous(breaks = seq(-79.085, -79.055, 0.01))
}