weighted_rmse: weighted_rmse

View source: R/weighted_rmse.R

weighted_rmseR Documentation

weighted_rmse

Description

Calculate a weighted RMSE. Weights are based on 'time' in the case of the weights variable. (E.g. older errors weigh less). And also based on the 'direction' e.g. predicting to few used ressources is worse than predicting a few ressources used too much.

Usage

weighted_rmse(
  actual,
  predicted,
  weights = exp(-(length(actual):1)/14),
  worsenGoodExpections = 1.5
)

Arguments

actual

Real Data, vector of observations

predicted

Predicted Data, vector of observations

weights

Time based decay. Default is an exponential decay

worsenGoodExpections

Factor by how much predicting too few used ressources should be punished more.

Value

weighted RMSE


babsim.hospital documentation built on May 30, 2022, 9:05 a.m.