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

# Interface HassAndStokes

public interface HassAndStokes

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static class`
`HassAndStokes.MethodOfMomentsFunction`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final double`
`HAAS_AND_STOKES_ALPHA1`
`static final double`
`HAAS_AND_STOKES_ALPHA2`
`static final int`
`HAAS_AND_STOKES_UJ2A_C`
`static final boolean`
`HAAS_AND_STOKES_UJ2A_CUT2`
`static final boolean`
`HAAS_AND_STOKES_UJ2A_SOLVE`
`static final int`
`MAX_SOLVE_CACHE_SIZE`

## Method Summary

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

## Field Details

### 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 Details

### 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.