Chapter 1. Introduction to Scala and Machine Learning

In this world of ever-growing data, we need to be quick at prototyping and at the same time we need to have a system that can handle the challenges of scalability. Scala offers a good balance between productivity and performance. In this chapter we will explore the tools, set them up and become familiar with them. In short, we will be setting the stage for your recommendation engine project. We will cover the following points:

  • Setting up Scala, SBT, and Apache Spark
  • Giving a quick introduction to Scala
  • Discussing machine learning and recommendation engine jargon

Setting up Scala, SBT, and Apache Spark

Scala and SBT setup varies across platforms (Linux, Unix, Window, and Mac), therefore we will redirect you to the respective locations for further instructions. Please ensure you have the required versions you will need in the following steps.

For installing Scala:

  1. You will need to have JDK (Java 7) already installed.
  2. Next download Scala version 2.11.x: http://www.scala-lang.org/download/.
  3. And follow the steps here: http://www.scala-lang.org/download/install.html.

For setting up SBT, follow the steps here: http://www.scala-sbt.org/release/tutorial/Setup.html.

For setting up Apache Spark, first download spark-1.3.0.tgz from here: https://spark.apache.org/downloads.html.

You can also install the popular GUI development environments mentioned in the following list. However, that is your choice:

Let's continue with our Apache Spark setup. Now extract the archive:

$ tar zxf spark-1.3.0.tgz
$ cd spark-1.3.0

Run Spark in local mode:

$ bin/spark-shell
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.255.250