Machine Learning in R: Neural Network using Keras

This is amazing. Imagine building a model where after its built you can identify anyone’s hand written numbers with an accuracy of 98%. And imagine too that you could use this same methodology for facial recognition or identifying dogs vs cats or a even identifying a specific dog from a group of dog photos? That’s what you’re going to learn in this course. Word of Warning: Pay attention to the details but pay more attention to the form.

Start for Free
First 2 tasks free. Then, decide to pay $4.99 for the rest
Machine Learning in R: Neural Network using Keras

Task List

We will cover the following tasks in 31 minutes:


In this chapter we will discuss Neural Networks, I’ll give you a quick history of where we are on machine learning in 2018, I’ll introduce you to the Rhyme Interface, and at the end I’ll share a bit about myself.

Theory? Nah.

In this section I will start by showing you a visual representation of a tensor. We will then move onto creating 60,000 tensors in the same form of the illustrated one I showed prior. We will do this by using the array_reshape function in Keras.

One Hot Encoding

This is a life saver. We need to make sure the Output is in the same form as the Input. So we use “One Hot Encoding”. Come in and you’ll see how this is done.

Building Out Model

So now it’s time to start constructing our model. We will build an Input Layer with two Hidden Layers. Easy squeezy.

Loss Optimizer and Model Run

We need to build a loss optimizer so we can spot when the model starts over fitting. We will do that and then we will train the model on the Training Images and Labels.

Test Data and Summary

The model did well! But how about on numbers it hasn’t seen (true test), which could really be mine or yours. In this case its High School Students. After we’re done with that I will recap and we can get on with our next tutorial.

Watch Preview

Preview the instructions that you will follow along in a hands on session in your browser.

Chris Shockley

About the Host (Chris Shockley)

I am a R enthusiast, hiker, and amateur astronomer. My favorite hike is located in Mt. Rainier National Park, my favorite Deep Sky Object is Alberio, and my favorite R package is dplyr (since I use it everyday). I am single too. Maybe because I spend too much time playing? I have a dog named Coog (Lllasa Apso), who would rather be outside than inside, which means I have to take him on a lot of walks. I work as a Data Analyst/Financial Analyst for a Metals Co. located in Seattle, WA. I have been in my current position for 4 years. My hope is that I can help you, even if its with my enthusiasm. Yes you can learn R and the Rhyme Interface will help you. But. You also must take what you learn and practice, practice, practice. So... Let's get after it. See you soon.

Frequently Asked Questions

In Rhyme, all sessions are completely hands on. You don't just passively watch someone else. You use the software directly while following the host's (Chris Shockley) instructions. Using the software is the only way to achieve mastery. With the "Live Guide" option, you can ask for help and get immediate response.
Nothing! Just join through your web browser. Your host (Chris Shockley) has already installed all required software and configured all data.
You can go to, sign up for free, and follow this visual guide How to use Rhyme to create your own sessions. If you have custom needs or company-specific environment, please email us at
Absolutely. We offer Rhyme for workgroups as well larger departments and companies. Universities, academies, and bootcamps can also buy Rhyme for their settings. You can select sessions and trainings that are mission critical for you and, as well, author your own that reflect your own needs and tech environments. Please email us at
Please email us at and we'll respond to you within one business day.

First 2 tasks free. Then, decide to pay $4.99 for the rest