code: public static double sigmaToGamma(double sigma)
      {
          if(sigma <= 0 || Double.isNaN(sigma) || Double.isInfinite(sigma))
              throw new IllegalArgumentException("sigma must be positive, not " + sigma);
          return 1/(2*sigma*sigma);
      }
docs: Another common (equivalent) form of the RBF kernel is k(x, y) =
  exp(-&gamma;||x-y||<sup>2</sup>). This method converts the &sigma; value
  used by this class to the equivalent &gamma; value.
  @param sigma the value of &sigma;
  @return the equivalent &gamma; value.