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 }
From the results of a UScale run calculate the best - fit scaling equation