frlearn.transformations.truncated_complement#
- frlearn.transformations.truncated_complement(x)#
Order-reversing function from [0, ∞) to [0, 1] that sends
x
tomax(0, 1 - x)
. Preserves absolute differences for values under 1, but discards all differences for larger values.- Parameters:
- xfloat
Input value. Should be in
[0, ∞)
.
- Returns:
- yfloat
Output value in [0, 1].