code: public static double normalize(double i, double factor) {
          Validate.isTrue(i >= 0, "should be positive value");
          return (1 / (1 + java.lang.Math.exp(-1 * (factor * i))) - 0.5) * 2;
      }
docs: Useful for normalizing integer or double values to a number between 0 and 1.
  This uses a simple logistic function: https://en.wikipedia.org/wiki/Logistic_function
  with some small adaptations:
  <pre>
  (1 / (1 + java.lang.Math.exp(-1 * (factor * i))) - 0.5) * 2
  </pre>
  
  @param i
  any positive long
  @param factor
  allows you to control how quickly things converge on 1. For values that range between 0 and the low
  hundreds, something like 0.05 is a good starting point.
  @return a double between 0 and 1.