Generic plot function for CAST Classes
A plotting function for a forward feature selection result. Each point is the mean performance of a model run. Error bars represent the standard errors from cross validation. Marked points show the best model from each number of variables until a further variable could not improve the results. If type=="selected", the contribution of the selected variables to the model performance is shown.
Density plot of nearest neighbor distances in geographic space or feature space between training data as well as between training data and prediction locations. Optional, the nearest neighbor distances between training data and test data or between training data and CV iterations is shown. The plot can be used to check the suitability of a chosen CV method to be representative to estimate map accuracy.
Plot the DI/LPD and errormetric from Cross-Validation with the modeled relationship
# S3 method for trainDI
plot(x, ...)# S3 method for aoa
plot(x, samplesize = 1000, variable = "DI", ...)
# S3 method for nndm
plot(x, type = "strict", stat = "ecdf", ...)
# S3 method for knndm
plot(x, type = "strict", stat = "ecdf", ...)
# S3 method for ffs
plot(
x,
plotType = "all",
palette = rainbow,
reverse = FALSE,
marker = "black",
size = 1.5,
lwd = 0.5,
pch = 21,
...
)
# S3 method for geodist
plot(x, unit = "m", stat = "density", ...)
# S3 method for errorModel
plot(x, ...)
a ggplot
a ggplot
errorModel, see DItoErrormetric
other params
numeric. How many prediction samples should be plotted?
character. Variable for which to generate the density plot. 'DI' or 'LPD'
String, defaults to "strict" to show the original nearest neighbour distance definitions in the legend. Alternatively, set to "simple" to have more intuitive labels.
"density" for density plot or "ecdf" for empirical cumulative distribution function plot.
character. Either "all" or "selected"
A color palette
Character. Should the palette be reversed?
Character. Color to mark the best models
Numeric. Size of the points
Numeric. Width of the error bars
Numeric. Type of point marking the best models
character. Only if type=="geo" and only applied to the plot. Supported: "m" or "km".
Marvin Ludwig, Hanna Meyer
Carles Milà
if (FALSE) {
data(splotdata)
splotdata <- st_drop_geometry(splotdata)
ffsmodel <- ffs(splotdata[,6:16], splotdata$Species_richness, ntree = 10)
plot(ffsmodel)
#plot performance of selected variables only:
plot(ffsmodel,plotType="selected")
}
Run the code above in your browser using DataLab