Run ML algorithm inside map function in Spark
问题 So I have been trying for some days now to run ML algorithms inside a map function in Spark. I posted a more specific question but referencing Spark's ML algorithms gives me the following error: AttributeError: Cannot load _jvm from SparkContext. Is SparkContext initialized? Obviously I cannot reference SparkContext inside the apply_classifier function. My code is similar to what was suggested in the previous question I asked but still haven't found a solution to what I am looking for: def