Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

metrics

Model metrics


Description

Common model/evaluation metrics for machine learning.

Usage

metric_mse(actual, predicted, na.rm = FALSE)

metric_rmse(actual, predicted, na.rm = FALSE)

metric_sse(actual, predicted, na.rm = FALSE)

metric_mae(actual, predicted, na.rm = FALSE)

metric_rsquared(actual, predicted, na.rm = FALSE)

metric_accuracy(actual, predicted, na.rm = FALSE)

metric_error(actual, predicted, na.rm = FALSE)

metric_auc(actual, predicted)

metric_logLoss(actual, predicted)

metric_mauc(actual, predicted)

Arguments

actual

Vector of actual target values.

predicted

Vector of predicted target values.

na.rm

Logical indicating whether or not NA values should be stripped before the computation proceeds.

Note

The metric_auc and metric_logLoss functions are based on code from the Metrics package.

Examples

x <- rnorm(10)
y <- rnorm(10)
metric_mse(x, y)
metric_rsquared(x, y)

vip

Variable Importance Plots

v0.3.2
GPL (>= 2)
Authors
Brandon Greenwell [aut, cre] (<https://orcid.org/0000-0002-8120-0084>), Brad Boehmke [aut] (<https://orcid.org/0000-0002-3611-8516>), Bernie Gray [aut] (<https://orcid.org/0000-0001-9190-6032>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.