Package org.apache.sysds.hops.estim
Class EstimatorDensityMap
- java.lang.Object
- 
- org.apache.sysds.hops.estim.SparsityEstimator
- 
- org.apache.sysds.hops.estim.EstimatorDensityMap
 
 
- 
 public class EstimatorDensityMap extends SparsityEstimator This estimator implements an approach called density maps, as introduced in David Kernert, Frank Köhler, Wolfgang Lehner: SpMacho - Optimizing Sparse Linear Algebra Expressions with Probabilistic Density Estimation. EDBT 2015: 289-300. The basic idea is to maintain a density matrix per input, i.e., non-zero counts per bxb cells of the matrix, and compute the output density map based on a matrix-multiply-like aggregation of average estimates per cell. The output sparsity is then derived as an aggregate of the output density map, but this density map can also be used for intermediates in chains of matrix multiplications.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classEstimatorDensityMap.DensityMap- 
Nested classes/interfaces inherited from class org.apache.sysds.hops.estim.SparsityEstimatorSparsityEstimator.OpCode
 
- 
 - 
Field Summary- 
Fields inherited from class org.apache.sysds.hops.estim.SparsityEstimatorMIN_PAR_THRESHOLD, MULTI_THREADED_BUILD, MULTI_THREADED_ESTIM
 
- 
 - 
Constructor SummaryConstructors Constructor Description EstimatorDensityMap()EstimatorDensityMap(int blocksize)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description DataCharacteristicsestim(MMNode root)Estimates the output sparsity of a DAG of matrix multiplications for the given operator graph of a single root node.doubleestim(MatrixBlock m, SparsityEstimator.OpCode op)Estimates the output sparsity for a given unary operation.doubleestim(MatrixBlock m1, MatrixBlock m2)Estimates the output sparsity for a single matrix multiplication.doubleestim(MatrixBlock m1, MatrixBlock m2, SparsityEstimator.OpCode op)Estimates the output sparsity for a given binary operation.EstimatorDensityMap.DensityMapestimIntern(EstimatorDensityMap.DensityMap m1Map, EstimatorDensityMap.DensityMap m2Map, SparsityEstimator.OpCode op)Computes the output density map given the density maps of the input operands.
 
- 
- 
- 
Method Detail- 
estimpublic DataCharacteristics estim(MMNode root) Description copied from class:SparsityEstimatorEstimates the output sparsity of a DAG of matrix multiplications for the given operator graph of a single root node.- Specified by:
- estimin class- SparsityEstimator
- Parameters:
- root- DAG root node
- Returns:
- output data characteristics
 
 - 
estimpublic double estim(MatrixBlock m1, MatrixBlock m2) Description copied from class:SparsityEstimatorEstimates the output sparsity for a single matrix multiplication.- Specified by:
- estimin class- SparsityEstimator
- Parameters:
- m1- left-hand-side operand
- m2- right-hand-side operand
- Returns:
- sparsity
 
 - 
estimpublic double estim(MatrixBlock m1, MatrixBlock m2, SparsityEstimator.OpCode op) Description copied from class:SparsityEstimatorEstimates the output sparsity for a given binary operation.- Specified by:
- estimin class- SparsityEstimator
- Parameters:
- m1- left-hand-side operand
- m2- right-hand-side operand
- op- operator code
- Returns:
- sparsity
 
 - 
estimpublic double estim(MatrixBlock m, SparsityEstimator.OpCode op) Description copied from class:SparsityEstimatorEstimates the output sparsity for a given unary operation.- Specified by:
- estimin class- SparsityEstimator
- Parameters:
- m- left-hand-side operand
- op- operator code
- Returns:
- sparsity
 
 - 
estimInternpublic EstimatorDensityMap.DensityMap estimIntern(EstimatorDensityMap.DensityMap m1Map, EstimatorDensityMap.DensityMap m2Map, SparsityEstimator.OpCode op) Computes the output density map given the density maps of the input operands.- Parameters:
- m1Map- density map left-hand-side operand
- m2Map- density map right-hand-side operand
- op- operator code
- Returns:
- density map
 
 
- 
 
-