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. We use a housing dataset from the UCI machine library depository. You can download the entire dataset from the following URL:

https://archive.ics.uci.edu/ml/machine-learning-databases/housing/

The dataset comprises 14 columns with the first 13 columns being the independent variables (features) that try to explain the median price (last column) of an owner-occupied house in Boston, USA.

We have chosen and cleaned the first eight columns as features. We use the first 200 rows to train and predict the median price:

  1. Start a new project in IntelliJ or in an IDE of your choice. Make sure that the necessary JAR files are included. ...

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