to_data_frame

elephas.ml.adapter.to_data_frame(sc: pyspark.context.SparkContext, features: <built-in function array>, labels: <built-in function array>, categorical: bool = False)

Convert numpy arrays of features and labels into Spark DataFrame


from_data_frame

elephas.ml.adapter.from_data_frame(df: pyspark.sql.dataframe.DataFrame, categorical: bool = False, nb_classes: Optional[int] = None)

Convert DataFrame back to pair of numpy arrays


df_to_simple_rdd

elephas.ml.adapter.df_to_simple_rdd(df: pyspark.sql.dataframe.DataFrame, categorical: bool = False, nb_classes: Optional[int] = None, features_col: str = 'features', label_col: str = 'label')

Convert DataFrame into RDD of pairs