code: public static MathEquation detect(UScale scale) {
          return Arrays.stream(rank(scale))
                  .filter(eq -> eq.isValid())
                  .findFirst()
                  .orElse(fit(scale, Models.CONSTANT)); // if no valid is found, it is because of constant data
      }
docs: From the results of a UScale run, calculate the best-fit scaling equation
  @param scale the results to analyze
  @return the best-fit scaling equation.