normalise_data

compas_fea2.utilities.normalise_data(data, cmin, cmax)[source]

Normalise a vector of data to between -1 and 1.

Parameters:
  • data (array) – Raw data.

  • cmin (float) – Cap data values >= cmin.

  • cmax (float) – Cap data values <= cmax.

Returns:

  • array – -1 to 1 scaled data.

  • float – The maximum absolute unscaled value.