'Normalize the predictions to the range between 0.0 and 1.0.
For some predictions like SVM predictions, we need to normalize them before
calculate the interpolated average precision. The normalization will not
change the rank in the original list and thus won\'t change the average
precision.
Args:
predictions: a numpy 1-D array storing the sparse prediction scores.
epsilon: a small constant to avoid denominator being zero.
Returns:
The normalized prediction.'

@staticmethod
def _zero_one_normalize(predictions, epsilon=1e-07):

    denominator = (numpy.max(predictions) - numpy.min(predictions))
    ret = ((predictions - numpy.min(predictions)) / numpy.max(denominator, epsilon))
    return ret
