docs: protected static double estimateInitialBeta(double[] dist_i, double perplexity) {
      double sum = 0.;
      for(double d : dist_i) {
        double d2 = d * d;
        sum += d2 < Double.POSITIVE_INFINITY ? d2 : 0.;
      }
      return sum > 0 && sum < Double.POSITIVE_INFINITY ? .5 / sum * perplexity * (dist_i.length - 1.) : 1.;
    }