org.apache.sysml.api

Class MLOutput


  • Deprecated. 
    This will be removed in SystemML 1.0. Please migrate to MLContext and MLResults

    @Deprecated
    public class MLOutput
    extends Object
    This is a simple container object that returns the output of execute from MLContext
    • Method Detail

      • getDF

        public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getDF(org.apache.spark.sql.SparkSession sparkSession,
                                                                            String varName)
                                                                     throws DMLRuntimeException
        Deprecated. 
        Note, the output DataFrame has an additional column ID. An easy way to get DataFrame without ID is by df.drop("__INDEX")
        Parameters:
        sparkSession - the Spark Session
        varName - the variable name
        Returns:
        the DataFrame
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • getDF

        public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getDF(org.apache.spark.sql.SQLContext sqlContext,
                                                                            String varName)
                                                                     throws DMLRuntimeException
        Deprecated. 
        Note, the output DataFrame has an additional column ID. An easy way to get DataFrame without ID is by df.drop("__INDEX")
        Parameters:
        sqlContext - the SQL Context
        varName - the variable name
        Returns:
        the DataFrame
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • getDF

        public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getDF(org.apache.spark.sql.SparkSession sparkSession,
                                                                            String varName,
                                                                            boolean outputVector)
                                                                     throws DMLRuntimeException
        Deprecated. 
        Obtain the DataFrame
        Parameters:
        sparkSession - the Spark Session
        varName - the variable name
        outputVector - if true, returns DataFrame with two column: ID and org.apache.spark.ml.linalg.Vector
        Returns:
        the DataFrame
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • getDF

        public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getDF(org.apache.spark.sql.SQLContext sqlContext,
                                                                            String varName,
                                                                            boolean outputVector)
                                                                     throws DMLRuntimeException
        Deprecated. 
        Obtain the DataFrame
        Parameters:
        sqlContext - the SQL Context
        varName - the variable name
        outputVector - if true, returns DataFrame with two column: ID and org.apache.spark.ml.linalg.Vector
        Returns:
        the DataFrame
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • getDF

        public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getDF(org.apache.spark.sql.SparkSession sparkSession,
                                                                            String varName,
                                                                            MatrixCharacteristics mc)
                                                                     throws DMLRuntimeException
        Deprecated. 
        This methods improves the performance of MLPipeline wrappers.
        Parameters:
        sparkSession - the Spark Session
        varName - the variable name
        mc - the matrix characteristics
        Returns:
        the DataFrame
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • getDF

        public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getDF(org.apache.spark.sql.SQLContext sqlContext,
                                                                            String varName,
                                                                            MatrixCharacteristics mc)
                                                                     throws DMLRuntimeException
        Deprecated. 
        This methods improves the performance of MLPipeline wrappers.
        Parameters:
        sqlContext - the SQL Context
        varName - the variable name
        mc - the matrix characteristics
        Returns:
        the DataFrame
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • getDataFrameRDD

        public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getDataFrameRDD(String varName,
                                                                                      org.apache.spark.api.java.JavaSparkContext jsc)
                                                                               throws DMLRuntimeException
        Deprecated. 
        Throws:
        DMLRuntimeException

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