How to read the Machine Learning Is Fun! book
Thank you so much for purchasing the book. Here are some tips on how to get started reading the book and how to access the hands-on projects (if you purchased the Developer Bundle).
Step 1: Download your files
First, you need to download the book from the link you received via email.
If you purchased the Developer Edition, also go ahead and download all the extras. The virtual machine image is large (about 12 gigs), so make sure you download over a connection where you won’t get charged a usage fee!
Step 2: Read the book
When you download the book, you’ll have in three different file formats. Here’s how to read it:
On a Desktop Computer
If you are reading the book on a desktop computer, just open the PDF file in your favorite PDF reader.
If you prefer using a specific e-reader app like iBooks or Calibre, you can open the epub instead. I personally think the PDF looks a little nicer, but that’s just me.
On a Kindle Device
To read the book on a Kindle e-reader, you’ll need to copy the file onto the device:
Plug the Kindle into your computer with a USB cable. It should show up as a new device in your file manager.
Drag the mobi file to your Kindle and put it in the documents subfolder (the exact folder name might vary depending on the model of Kindle).
Eject the Kindle from your computer. The Kindle will start up and the book should show up in your library!
On an iPhone or iPad
On your desktop computer, log into https://www.icloud.com/ using your Apple account.
Click on iCloud Drive.
Click the upload icon (arrow pointing to a cloud) and upload the epub file to your iCloud Drive account.
On your iPhone or iPad, open the Files app and navigate to the file you uploaded to iCloud Drive .
Click the Share button in the lower left hand corner of the Files app and choose Open in iBooks.
This will open iBooks, but you aren’t done yet! Click Share and choose Copy to iBooks. Now the book should be permanently on your iBooks bookshelf.
On an Android Phone / Tablet
Make sure you have the Play Books app installed.
On your desktop computer, go to https://play.google.com/books and click “Upload Files”.
Upload the epub file. Please note that it can take 15-20 minutes for Google to process the file. The book shows up with no cover image until the processing is complete. Even after it says processing is complete, you still have to wait a bit longer.
Launch the Play Books app on your phone. It will take a couple of minutes for the book to sync to your phone. After that completes, the book will appear on your bookshelf to read.
Step 3: Running the Virtual Machine
If you purchased the Developer Bundle, you’ll have access to the hands-on projects. To make it easy to get started, you’ll also have access to a pre-configured virtual machine that makes it easy to run the project code without installing a bunch of machine learning libraries.
To use the virtual machine, you need to first install VMware. If don’t already have it, install the right version for your operation system:
Windows: VMware Player (free)
Mac: VMware Fusion (30-day free demo). Other options for Mac include Parallels Desktop (paid) and VirtualBox (free, but slow).
Linux: VMware Player (free)
Once you have VMware installed, launch it and use the file menu to import the MLIF_projects.ova file you downloaded. Follow the prompts and you’ll end up with the virtual machine running on your desktop:
Feel free to maximize the VMware window so that you have a little more space to work with. Also, notice that project source code is already on the desktop in the project_code folder. You don’t need to copy it over to the virtual machine yourself.
To get started, click the PyCharm icon in the top left (the one that says “PC”).
When PyCharm loads, the project containing all the source code should already be loaded. You’ll see a list of sub-folders in the Project sidebar in PyCharm:
Each numbered folder corresponds to one hands-on project in the book. From here, you can open any of folders and explore the files inside.
The very first time you launch PyCharm, it has to index all the Python libraries that are already installed. You can watch the indexing progress in the status bar at the bottom of the window. You have to wait for that to finish before you can move on.
When indexing completes, open train_model.py by double-clicking on it from inside the first project folder. To run it after opening it, right-click on the code editor and choose “Run train_model…”:
You’ll see the output of the program pop up at the bottom:
That’s it! You can run any file the same way – just right-click on the code and choose Run. The project chapters in the book will walk you through the code in more detail.
In a couple of projects (like when doing text classification), you’ll also need to run a Linux terminal. You can do that by clicking on the second icon down on the top left:
The username and password are:
deeplearning / deeplearning
You can change the password to anything you want to make it more secure.
If you need to do something as a root/admin user, you can type “sudo <command>” in a terminal window and enter your own password. That will let you run any command as an administrator.