Package org.apache.sysds.runtime.compress.estim.sample

## Interface HassAndStokes

    public interface HassAndStokes

### Nested Class Summary

Nested Classes
`static class` `HassAndStokes.MethodOfMomentsFunction`

### Field Summary

Fields
`static double` `HAAS_AND_STOKES_ALPHA1`
`static double` `HAAS_AND_STOKES_ALPHA2`
`static int` `HAAS_AND_STOKES_UJ2A_C`
`static boolean` `HAAS_AND_STOKES_UJ2A_CUT2`
`static boolean` `HAAS_AND_STOKES_UJ2A_SOLVE`
`static int` `MAX_SOLVE_CACHE_SIZE`

### Method Summary

Static Methods
`static int` `distinctCount​(int numVals, int[] freqCounts, int nRows, int sampleSize, HashMap<Integer,​Double> solveCache)` Haas, Peter J., and Lynne Stokes.

### Field Detail

#### HAAS_AND_STOKES_ALPHA1

    static final double HAAS_AND_STOKES_ALPHA1

See Also:
  Constant Field Values

#### HAAS_AND_STOKES_ALPHA2

    static final double HAAS_AND_STOKES_ALPHA2

See Also:
  Constant Field Values

#### HAAS_AND_STOKES_UJ2A_C

    static final int HAAS_AND_STOKES_UJ2A_C

See Also:
  Constant Field Values

#### HAAS_AND_STOKES_UJ2A_CUT2

    static final boolean HAAS_AND_STOKES_UJ2A_CUT2

See Also:
  Constant Field Values

#### HAAS_AND_STOKES_UJ2A_SOLVE

    static final boolean HAAS_AND_STOKES_UJ2A_SOLVE

See Also:
  Constant Field Values

#### MAX_SOLVE_CACHE_SIZE

    static final int MAX_SOLVE_CACHE_SIZE

See Also:
  Constant Field Values

### Method Detail

#### distinctCount

    static int distinctCount​(int numVals,
                             int[] freqCounts,
                             int nRows,
                             int sampleSize,
                             HashMap<Integer,​Double> solveCache)

Haas, Peter J., and Lynne Stokes. "Estimating the number of classes in a finite population." Journal of the American Statistical Association 93.444 (1998): 1475-1487. The hybrid estimator given by Eq. 33 in Section 6

Parameters:
  `numVals` - The number of unique values in the sample
  `freqCounts` - The inverse histogram of frequencies. counts extracted
  `nRows` - The number of rows originally in the input
  `sampleSize` - The number of rows used in the sample
  `solveCache` - A Hashmap containing information for getDuj2aEstimate
Returns:
  An estimation of distinct elements in the population.