QuestionQ6
VerifiedUsing Spark MLA Data Scientist is creating a pipeline to train multiple machine-learning models. They have a dataframe containing a group column, many feature columns, and one label column.
Their requirements are:
- An independent model for each group
- Direct use of the data in the columns without transformation
- Flexibility to select from many different model types
- Efficient distributed-computing capabilities
They are deciding between the pyspark.ml library and pandas UDFs through groupby().ApplyInPandas() to train the models. They choose the groupBy().ApplyInPandas() approach.
What is a valid reason for this choice?
Community Discussion