to_data_frame

elephas.ml.adapter.to_data_frame(sc, features, labels, categorical=False)

Convert numpy arrays of features and labels into Spark DataFrame


from_data_frame

elephas.ml.adapter.from_data_frame(df, categorical=False, nb_classes=None)

Convert DataFrame back to pair of numpy arrays


df_to_simple_rdd

elephas.ml.adapter.df_to_simple_rdd(df, categorical=False, nb_classes=None, features_col='features', label_col='label')

Convert DataFrame into RDD of pairs