Class KMVSketch
java.lang.Object
org.apache.sysds.runtime.matrix.data.sketch.CountDistinctSketch
org.apache.sysds.runtime.matrix.data.sketch.countdistinctapprox.KMVSketch
- All Implemented Interfaces:
MatrixSketch
KMV synopsis(for k minimum values) Distinct-Value Estimation
Kevin S. Beyer, Peter J. Haas, Berthold Reinwald, Yannis Sismanis, Rainer Gemulla:
On synopses for distinctâvalue estimation under multiset operations. SIGMOD 2007
TODO: Add multi-threaded version
-
Field Summary
Fields inherited from class org.apache.sysds.runtime.matrix.data.sketch.CountDistinctSketch
op -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(MatrixBlock blkIn) Create an initial sketch of a given block.getValue(MatrixBlock blkIn) Get scalar distinct count from an input matrix block.Obtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.intersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1) Intersect two sketchesunion(CorrMatrixBlock arg0, CorrMatrixBlock arg1) Union two sketches together to from a combined sketch.voidunionSketchByIndex(CorrMatrixBlock arg0, CorrMatrixBlock arg1, int idx, CorrMatrixBlock blkOut)
-
Constructor Details
-
KMVSketch
-
-
Method Details
-
getValue
Description copied from interface:MatrixSketchGet scalar distinct count from an input matrix block.- Parameters:
blkIn- An input block to estimate the number of distinct values in- Returns:
- The result matrix block containing the distinct count estimate
-
getValueFromSketch
Description copied from interface:MatrixSketchObtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.- Parameters:
arg0- The sketch block to extract the count from- Returns:
- The result matrix block
-
create
Description copied from interface:MatrixSketchCreate an initial sketch of a given block.- Parameters:
blkIn- A block to process- Returns:
- A sketch
-
union
Description copied from interface:MatrixSketchUnion two sketches together to from a combined sketch.- Parameters:
arg0- Sketch onearg1- Sketch two- Returns:
- The sketch union is a sketch
-
unionSketchByIndex
public void unionSketchByIndex(CorrMatrixBlock arg0, CorrMatrixBlock arg1, int idx, CorrMatrixBlock blkOut) -
intersection
Description copied from interface:MatrixSketchIntersect two sketches- Parameters:
arg0- Sketch onearg1- Sketch two- Returns:
- The sketch intersection is a sketch
-