scale_me function

scale_me

scale_me

maps all instances in x to the [0;1] range using the equation:

y = (x-min)/(max-min)

If no values for min and max are given, they are calculated per default as min=min(x) and max=max(x)

scale_me(x, min = NULL, max = NULL)

Arguments

  • x: vector of predictions
  • min: minimum of x, Default: NULL
  • max: maximum of x, Default: NULL

Returns

scaled values of x

Details

if x is greater (smaller) than max (min), its calibrated prediction is set to 1 (0) and warning is triggered.

  • Maintainer: Dominik Heider
  • License: LGPL-3
  • Last published: 2019-08-19

Useful links