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

## Class HassAndStokes

- java.lang.Object
- - org.apache.sysds.runtime.compress.estim.sample.HassAndStokes

-     public class HassAndStokes
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `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`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HassAndStokes()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `haasAndStokes(ABitmap ubm, int nRows, int sampleSize, HashMap<Integer,Double> solveCache)` Haas, Peter J., and Lynne Stokes.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### HAAS_AND_STOKES_ALPHA1

          public static final double HAAS_AND_STOKES_ALPHA1

      See Also:
        Constant Field Values

    - #### HAAS_AND_STOKES_ALPHA2

          public static final double HAAS_AND_STOKES_ALPHA2

      See Also:
        Constant Field Values

    - #### HAAS_AND_STOKES_UJ2A_C

          public static final int HAAS_AND_STOKES_UJ2A_C

      See Also:
        Constant Field Values

    - #### HAAS_AND_STOKES_UJ2A_CUT2

          public static final boolean HAAS_AND_STOKES_UJ2A_CUT2

      See Also:
        Constant Field Values

    - #### HAAS_AND_STOKES_UJ2A_SOLVE

          public static final boolean HAAS_AND_STOKES_UJ2A_SOLVE

      See Also:
        Constant Field Values

    - #### MAX_SOLVE_CACHE_SIZE

          public static final int MAX_SOLVE_CACHE_SIZE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HassAndStokes

          public HassAndStokes()

  - ### Method Detail

    - #### haasAndStokes

          public static int haasAndStokes(ABitmap ubm,
                                          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:
        `ubm` - The Uncompressed Bit map
        `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.

Copyright © 2021 The Apache Software Foundation. All rights reserved.