O'Reilly logo

Machine Learning with Spark - Second Edition by Nick Pentreath, Manpreet Singh Ghotra, Rajdeep Dua

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

StumbleUponExecutor

The StumbleUponExecutor (https://github.com/ml-resources/spark-ml/blob/branch-ed2/Chapter_06/2.0.0/scala-spark-app/src/main/scala/org/sparksamples/classification/stumbleupon/StumbleUponExecutor.scala) object can be used to choose and run the respective classification model; for example, to run LogisiticRegression and to execute the logistic regression pipeline, set program argument as LR. For other commands, refer to the following code snippet:

case "LR" => LogisticRegressionPipeline.logisticRegressionPipeline(vectorAssembler, dataFrame) case "DT" => DecisionTreePipeline.decisionTreePipeline(vectorAssembler, dataFrame) case "RF" => RandomForestPipeline.randomForestPipeline(vectorAssembler, dataFrame) case "GBT" => GradientBoostedTreePipeline.gradientBoostedTreePipeline(vectorAssembler, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required