Learn R Programming

BaTFLED3D (version 0.2.11)

plot_preds: Make a scatterplot of observed vs. predicted values

Description

If there are more than 25,0000 points then they are subsampled down to 25,000. Observed values are on the x axis predicted values on the y. A blue line shows the diagonal. Points are transparent to show dense clusters. Predictions for points where the true value is not known are plotted at zero in blue.

Usage

plot_preds(pred, true, show.na = T, ...)

Arguments

pred

matrix or vector of predicted values

true

matrix or vector of predicted values

show.na

logical, display NA values as blue dots at the mean for the x or y axis (def: T)

...

other parameters passed to plot

Value

none

Examples

Run this code
# NOT RUN {
x <- seq(-10,10, 0.01)+rnorm(2001)
y <- seq(-10,10, 0.01)+rnorm(2001)
x[sample(2001, 100)] <- NA
plot_preds(y, x)
# }

Run the code above in your browser using DataLab