mse_vec: Mean squared error

View source: R/metrics.R

mse_vecR Documentation

Mean squared error

Description

Calculate the mean squared error. This metric is in squared units of the original data.

Usage

mse_vec(truth, estimate, na_rm = TRUE, ...)

mse(data, ...)

## S3 method for class 'data.frame'
mse(data, truth, estimate, na_rm = TRUE, ...)

Arguments

truth

The column identifier for the true class results (that is a factor). This should be an unquoted column name although this argument is passed by expression and supports quasiquotation (you can unquote column names). For _vec() functions, a factor vector.

estimate

The column identifier for the predicted class results (that is also factor). As with truth this can be specified different ways but the primary method is to use an unquoted variable name. For _vec() functions, a factor vector.

na_rm

A logical value indicating whether NA values should be stripped before the computation proceeds.

...

Not currently used.

data

A 'data.frame' containing the 'truth' and 'estimate' columns.

Value

A 'tibble' with columns '.metric', '.estimator', and '.estimate' and 1 row of values.


stevenpawley/h2oparsnip documentation built on June 20, 2022, 12:48 p.m.