numeric_summary: Numeric summary

View source: R/metrics.R

numeric_summaryR Documentation

Numeric summary

Description

Given the observed and predicted values of numeric data computes the Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Normalized Root Mean Squared Error (NRMSE), Mean Arctangent Absolute Percentage Error (MAAPE), Mean Absolute Error (MAE), Person's correlation and R-Squared.

Usage

numeric_summary(observed, predicted, remove_na = TRUE)

Arguments

observed

(numeric) The observed values. It has to have the same length as predicted.

predicted

(numeric) The observed values. It has to have the same length as observed.

remove_na

(logical(1)) Should NA values be removed?. TRUE by default.

Value

A list with all metrics.

See Also

Other numeric_metrics: maape(), mae(), mse(), nrmse(), pearson(), r2(), rmse(), spearman()

Examples

## Not run: 
set.seed(1)
x <- rnorm(100)
numeric_summary(x, x)
numeric_summary(x, x - 1)
numeric_summary(x, x + 10)

## End(Not run)


brandon-mosqueda/SKM documentation built on Feb. 8, 2025, 5:24 p.m.