public class NormalizeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static double |
normalize(double value,
double min,
double max)
It normalizes a
value in [0,1] given a min and max value. |
static double |
normalize(double value,
double minRangeValue,
double maxRangeValue,
double min,
double max)
It normalizes a
value in a range [a, b] given a min and max value. |
public static double normalize(double value,
double minRangeValue,
double maxRangeValue,
double min,
double max)
value in a range [a, b] given a min and max value.
The equation used here were based on the following links:
https://stats.stackexchange.com/a/281165https://stats.stackexchange.com/a/178629https://en.wikipedia.org/wiki/Normalization_(statistics)https://en.wikipedia.org/wiki/Feature_scalingvalue - value number to be normalizedminRangeValue - the minimum value for the rangemaxRangeValue - the maximum value for the rangemin - minimum value that value can take onmax - maximum value that value can take onpublic static double normalize(double value,
double min,
double max)
value in [0,1] given a min and max value.value - number to be normalizedmin - minimum value that value can take onmax - maximum value that value can take onCopyright © 2019. All rights reserved.