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
public class KMVSketch extends CountDistinctSketch
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CorrMatrixBlock
create(MatrixBlock blkIn)
Create an initial sketch of a given block.MatrixBlock
getValue(MatrixBlock blkIn)
Get scalar distinct count from an input matrix block.MatrixBlock
getValueFromSketch(CorrMatrixBlock arg0)
Obtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.CorrMatrixBlock
intersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Intersect two sketchesCorrMatrixBlock
union(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Union two sketches together to from a combined sketch.void
unionSketchByIndex(CorrMatrixBlock arg0, CorrMatrixBlock arg1, int idx, CorrMatrixBlock blkOut)
-
-
-
Constructor Detail
-
KMVSketch
public KMVSketch(Operator op)
-
-
Method Detail
-
getValue
public MatrixBlock getValue(MatrixBlock blkIn)
Description copied from interface:MatrixSketch
Get 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
public MatrixBlock getValueFromSketch(CorrMatrixBlock arg0)
Description copied from interface:MatrixSketch
Obtain 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
public CorrMatrixBlock create(MatrixBlock blkIn)
Description copied from interface:MatrixSketch
Create an initial sketch of a given block.- Parameters:
blkIn
- A block to process- Returns:
- A sketch
-
union
public CorrMatrixBlock union(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Description copied from interface:MatrixSketch
Union 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
public CorrMatrixBlock intersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Description copied from interface:MatrixSketch
Intersect two sketches- Parameters:
arg0
- Sketch onearg1
- Sketch two- Returns:
- The sketch intersection is a sketch
-
-