docs: @Reference(authors = "Erich Schubert, Michael Gertz", //
        title = "Intrinsic t-Stochastic Neighbor Embedding for Visualization and Outlier Detection: A Remedy Against the Curse of Dimensionality?", //
        booktitle = "Proc. Int. Conf. Similarity Search and Applications, SISAP'2017", //
        url = "https://doi.org/10.1007/978-3-319-68474-1_13", //
        bibkey = "DBLP:conf/sisap/SchubertG17")
    protected static double estimateInitialBeta(DBIDRef ignore, DoubleDBIDListIter it, double perplexity) {
      double sum = 0.;
      int size = 0;
      for(it.seek(0); it.valid(); it.advance()) {
        if(DBIDUtil.equal(ignore, it)) {
          continue;
        }
        sum += it.doubleValue() < Double.POSITIVE_INFINITY ? it.doubleValue() : 0.;
        ++size;
      }
      // In degenerate cases, simply return 1.
      return (sum > 0. && sum < Double.POSITIVE_INFINITY) ? (.5 / sum * perplexity * (size - 1.)) : 1.;
    }