metrics: Model metrics

Description Usage Arguments Note Examples

Description

Common model/evaluation metrics for machine learning.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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

1
2
3
4
x <- rnorm(10)
y <- rnorm(10)
metric_mse(x, y)
metric_rsquared(x, y)

vip documentation built on Dec. 17, 2020, 5:08 p.m.