For a neural network, you need to bring the values to a scale from 0 to 1
$arr = [-7, 1, 99, -7.3, -6]; //в реальном десятки тысяч элементов It is necessary to build a curve along it, something like this: 
and find the point on the scale by value. In our case, for -4 should be 0.6