question: @ SuppressWarnings ( "unused" ) private static int shlosserJackknifeEstimator ( int nRows , int sampleSize , ReaderColumnSelection sampleRowsReader ) { HashMap < DblArray , Integer > valsCount = getValCounts ( sampleRowsReader ) ; double nBar = ( ( double ) sampleSize ) / valsCount . size ( ) ; double u = 0 ; for ( int cnt : valsCount . values ( ) ) { u += Math . pow ( cnt - nBar , 2 ) ; } u /= nBar ; if ( sampleSize != usedSampleSize ) computeCriticalValue ( sampleSize ) ; if ( u < uniformityCriticalValue ) { return smoothedJackknifeEstimator ( nRows , sampleSize , sampleRowsReader , valsCount ) ; } else { return shlosserEstimator ( nRows , sampleSize , sampleRowsReader , valsCount ) ; } }
target:  Peter J. Haas, Jeffrey F. Naughton, S. Seshadri, and Lynne Stokes. 1995. Sampling-Based Estimation of the Number of Distinct Values of an Attribute. VLDB'95, Section 5.2, recommended estimator by the authors