rmse: Root-Mean Square Error

Description Usage Arguments Examples

View source: R/mse.R

Description

Calculates the root mean square error

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rmse(...)

## Default S3 method:
rmse(actual, predicted, ...)

## S3 method for class 'lm'
rmse(modelObject, ...)

## S3 method for class 'glm'
rmse(modelObject, ...)

Arguments

...

additional parameters to be passed the the s3 methods

actual

A vector of the labels

predicted

A vector of predicted values

modelObject

the model object. Currently supported lm

Examples

1
2
3
4
5
data(testDF)
glmModel <- glm(y ~ ., data = testDF, family="binomial")
Preds <- predict(glmModel, type = 'response')

rmse(testDF$y, Preds)

ModelMetrics documentation built on March 26, 2020, 7:48 p.m.