O'Reilly logo

Apache Spark 2.x Machine Learning Cookbook by Shuen Mei, Broderick Hall, Meenakshi Rajendran, Siamak Amirghodsi

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

How to do it...

  1. Go to the UCLA website to download the file:

https://stats.idre.ucla.edu/stat/r/examples/asa/hmohiv.csv

The dataset we used is the actual data that is in the book Applied Survival Analysis: Regression Modeling of Time to Event Data by David W Hosmer and Stanley Lemeshow (1999). The data came from a HMO-HIM+ study and the data contains the following fields:

  1. Start a new project in IntelliJ or in an IDE of your choice. Make sure the necessary JAR files are included.
  2. Set up the package location where the program will reside:
package spark.ml.cookbook.chapter5
  1. Import the necessary packages for SparkSession to gain access to ...

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