Package org.apache.sysds.hops.estim
Class EstimatorMatrixHistogram
- java.lang.Object
-
- org.apache.sysds.hops.estim.SparsityEstimator
-
- org.apache.sysds.hops.estim.EstimatorMatrixHistogram
-
public class EstimatorMatrixHistogram extends SparsityEstimator
This estimator implements a remarkably simple yet effective approach for incorporating structural properties into sparsity estimation. The key idea is to maintain row and column nnz per matrix, along with additional meta data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EstimatorMatrixHistogram.MatrixHistogram
-
Nested classes/interfaces inherited from class org.apache.sysds.hops.estim.SparsityEstimator
SparsityEstimator.OpCode
-
-
Field Summary
-
Fields inherited from class org.apache.sysds.hops.estim.SparsityEstimator
MIN_PAR_THRESHOLD, MULTI_THREADED_BUILD, MULTI_THREADED_ESTIM
-
-
Constructor Summary
Constructors Constructor Description EstimatorMatrixHistogram()
EstimatorMatrixHistogram(boolean useExtended)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataCharacteristics
estim(MMNode root)
Estimates the output sparsity of a DAG of matrix multiplications for the given operator graph of a single root node.DataCharacteristics
estim(MMNode root, boolean topLevel)
double
estim(MatrixBlock m1, SparsityEstimator.OpCode op)
Estimates the output sparsity for a given unary operation.double
estim(MatrixBlock m1, MatrixBlock m2)
Estimates the output sparsity for a single matrix multiplication.double
estim(MatrixBlock m1, MatrixBlock m2, SparsityEstimator.OpCode op)
Estimates the output sparsity for a given binary operation.double
estimIntern(EstimatorMatrixHistogram.MatrixHistogram h1, EstimatorMatrixHistogram.MatrixHistogram h2, SparsityEstimator.OpCode op, long[] misc)
-
-
-
Method Detail
-
estim
public DataCharacteristics estim(MMNode root)
Description copied from class:SparsityEstimator
Estimates the output sparsity of a DAG of matrix multiplications for the given operator graph of a single root node.- Specified by:
estim
in classSparsityEstimator
- Parameters:
root
- DAG root node- Returns:
- output data characteristics
-
estim
public DataCharacteristics estim(MMNode root, boolean topLevel)
-
estim
public double estim(MatrixBlock m1, MatrixBlock m2)
Description copied from class:SparsityEstimator
Estimates the output sparsity for a single matrix multiplication.- Specified by:
estim
in classSparsityEstimator
- Parameters:
m1
- left-hand-side operandm2
- right-hand-side operand- Returns:
- sparsity
-
estim
public double estim(MatrixBlock m1, MatrixBlock m2, SparsityEstimator.OpCode op)
Description copied from class:SparsityEstimator
Estimates the output sparsity for a given binary operation.- Specified by:
estim
in classSparsityEstimator
- Parameters:
m1
- left-hand-side operandm2
- right-hand-side operandop
- operator code- Returns:
- sparsity
-
estim
public double estim(MatrixBlock m1, SparsityEstimator.OpCode op)
Description copied from class:SparsityEstimator
Estimates the output sparsity for a given unary operation.- Specified by:
estim
in classSparsityEstimator
- Parameters:
m1
- left-hand-side operandop
- operator code- Returns:
- sparsity
-
estimIntern
public double estimIntern(EstimatorMatrixHistogram.MatrixHistogram h1, EstimatorMatrixHistogram.MatrixHistogram h2, SparsityEstimator.OpCode op, long[] misc)
-
-