weighted_rmse: weighted_rmse

Description Usage Arguments Value

View source: R/weighted_rmse.R

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

1
2
3
4
5
6
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 Nov. 11, 2021, 1:06 a.m.