Hi all, I'm working with a function that only accepts values between 0 and 1, so I need to scale my data first.
The first part involved in this is calculating the high/low values of my inputs. I pass this into a function that churns out X and Y values for the intersection
X => aX + b between the line
X => highX + low and
X => 0X + 1
I then iterate through every input value, applying the following formula:
$data = (($x_y['x'] * $rawData) + $x_y['y']);
Now, my problem is that the function I pass the scaled value to changes the value by applying certain algorithm , and I am left with a value such as 0.38292. How do I descale this value?
Because I cannot be sure that the resultant value is higher or lower that the range I used for the initial scaling, I cannot simply reverse the same formula I used.
Does anyone have any ideas??