org.apache.sysml.api.mlcontext

Class BinaryBlockMatrix



  • public class BinaryBlockMatrix
    extends Object
    BinaryBlockMatrix stores data as a SystemML binary-block matrix representation.
    • Constructor Detail

      • BinaryBlockMatrix

        public BinaryBlockMatrix(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataFrame,
                                 MatrixMetadata matrixMetadata)
        Convert a Spark DataFrame to a SystemML binary-block representation.
        Parameters:
        dataFrame - the Spark DataFrame
        matrixMetadata - matrix metadata, such as number of rows and columns
      • BinaryBlockMatrix

        public BinaryBlockMatrix(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataFrame,
                                 long numRows,
                                 long numCols)
        Convert a Spark DataFrame to a SystemML binary-block representation, specifying the number of rows and columns.
        Parameters:
        dataFrame - the Spark DataFrame
        numRows - the number of rows
        numCols - the number of columns
      • BinaryBlockMatrix

        public BinaryBlockMatrix(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataFrame)
        Convert a Spark DataFrame to a SystemML binary-block representation.
        Parameters:
        dataFrame - the Spark DataFrame
      • BinaryBlockMatrix

        public BinaryBlockMatrix(org.apache.spark.api.java.JavaPairRDD<MatrixIndexes,MatrixBlock> binaryBlocks,
                                 MatrixCharacteristics matrixCharacteristics)
        Create a BinaryBlockMatrix, specifying the SystemML binary-block matrix and its metadata.
        Parameters:
        binaryBlocks - the JavaPairRDD<MatrixIndexes, MatrixBlock> matrix
        matrixCharacteristics - the matrix metadata as MatrixCharacteristics
    • Method Detail

      • getBinaryBlocks

        public org.apache.spark.api.java.JavaPairRDD<MatrixIndexes,MatrixBlock> getBinaryBlocks()
        Obtain a SystemML binary-block matrix as a JavaPairRDD<MatrixIndexes, MatrixBlock>
        Returns:
        the SystemML binary-block matrix
      • getMatrixBlock

        public MatrixBlock getMatrixBlock()
        Obtain a SystemML binary-block matrix as a MatrixBlock
        Returns:
        the SystemML binary-block matrix as a MatrixBlock
      • getMatrixCharacteristics

        public MatrixCharacteristics getMatrixCharacteristics()
        Obtain the SystemML binary-block matrix characteristics
        Returns:
        the matrix metadata as MatrixCharacteristics
      • getMatrixMetadata

        public MatrixMetadata getMatrixMetadata()
        Obtain the SystemML binary-block matrix metadata
        Returns:
        the matrix metadata as MatrixMetadata
      • setMatrixMetadata

        public void setMatrixMetadata(MatrixMetadata matrixMetadata)
        Set the SystemML binary-block matrix metadata
        Parameters:
        matrixMetadata - the matrix metadata
      • setBinaryBlocks

        public void setBinaryBlocks(org.apache.spark.api.java.JavaPairRDD<MatrixIndexes,MatrixBlock> binaryBlocks)
        Set the SystemML binary-block matrix as a JavaPairRDD<MatrixIndexes, MatrixBlock>
        Parameters:
        binaryBlocks - the SystemML binary-block matrix

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