scatter: Scatterplot with information on the errors between x and y.

Description Usage Arguments Details Value See Also Examples

Description

Scatterplot between a vector of observed data and a vector of predicted data with information on the errors between them.

Usage

1
scatter(obs, preds, vars, info = TRUE)

Arguments

obs

A vector of observed values

preds

A vector of predicted values

vars

Optional vector indicating different variables

info

A logical value indicating whether information on count, R2, bias and RMSE should be added to the plot

Details

Accuracy metrics are calculated from accuracy

Value

A ggplot2 object or a list of ggplot2 objects (one per variable)

See Also

accuracy

Examples

1
2
3
4
5
6
7
# kNN_preds is a data frame obtained from foster::trainNN
# It contains predictions and observations of the trained kNN model
load(system.file("extdata/examples/kNN_preds.RData",package="foster"))

scatter(obs = kNN_preds$obs,
        preds = kNN_preds$preds,
        vars = kNN_preds$variable)

mqueinnec/foster documentation built on March 28, 2021, 4:27 p.m.