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 ...

Get Apache Spark 2.x Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.