Reader small image

You're reading from  Learning AWS IoT

Product typeBook
Published inJan 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788396110
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Agus Kurniawan
Agus Kurniawan
author image
Agus Kurniawan

Agus Kurniawan is an independent technology consultant, author, and lecturer. He has over 18 years' experience working on various software development projects, including delivering training courses and workshops, and delivering technical writing. He has done a few research activities related to wireless networking, software, and security in multiple universities. Currently, he is pursuing a Ph.D. program in Computer Science in Germany. He has previously written five books for Packt.
Read more about Agus Kurniawan

Right arrow

Chapter 7. Building Predictive Analytics for AWS IoT

Machine learning is one of the potential technologies that has multiple benefits when applied to our business cases. In this chapter, you will learn various Amazon AWS services related to machine learning. Some demos will be explored using machine learning services from Amazon.

The following is a list of topics covered in this chapter:

  • Introducing AWS Machine Learning services
  • Making your sensor speak
  • Integrating Amazon Echo into your IoT projects
  • Making image and video analysis
  • Making predictive analytics for IoT data

Introducing AWS Machine Learning services


Machine learning is one of the subjects in computer science that describes how to teach computers to obtain the ability to learn without hardcoding in a program. More specifically, machine learning enables computers to learn from experiences such as data, information, and training results from experts.

All AWS Machine Learning services can be found at https://aws.amazon.com/machine-learning/. At the time of writing this book, AWS Machine Learning services are available in any region. Make sure that you change AWS region in order to enable AWS Machine Learning services:

In this chapter, we will explore some AWS Machine Learning services that are related to IoT topics.

Making your sensor speak


Suppose that you have deployed sensors at various locations. Those sensors perform monitoring to detect a specific purpose. When a sensor finds a thing that its looking for, a sensor device will send an alert to a command center. Some people probably stand by on that location. When an alert comes, the system can make a sound through a speaker. 

Message-to-sound or text-to-speech is a field of speech technology that leverages machine learning. A system can convert text or message to human speech. In general, the scenario can be described in the following figure:

From the preceding figure, IoT device can perform sensing and send data to AWS. IoT device can send an alert message to AWS to inform to the command center. AWS can convert text message to sound message. Once a command center receives a sound message, it performs to generate sound through a speaker.

Amazon AWS provides a service that applies speech technology, named Amazon Polly. You will learn how to work with...

Integrating Amazon Echo into your IoT projects


Amazon Echo is one of the Amazon products that uses speech technology. Amazon developed Artificial Intelligence (AI) to enable interaction with machines through speech. You can buy Amazon Echo on the Amazon website at https://www.amazon.com/dp/B06XCM9LJ4/. Unfortunately, Amazon Echo probably does not support for your country. A list of supported countries includes their features can be found on this website https://www.amazon.com/gp/help/customer/display.html?nodeId=202207000.

Amazon also provides a lite version from Amazon Echo known as Amazon Echo Dot. You can buy it on https://www.amazon.com/gp/product/B01DFKC2SO/. I bought this device from Amazon Germany. You can see my Amazon Echo Dot in the following image:

In this section, we will build a project to integrate between Amazon Echo and IoT board. In general, we develop a program based on a scenario in the following figure. We want to turn on/off the LED by giving a voice command. For instance...

Making image and video analysis


In this section, we learn how to analyze image and video. Machine learning can perform pattern recognition for a picture or a video. The result of machine learning analysis can be object detection or image analysis.

For instance, I have a still image; this image is analyzed using machine learning. It shows some identified objects, such as human, brick, clothing, and coat. You can see it in the following image. This process is done using Amazon Rekognition

In this section, we focus on how to use Amazon Rekognition to analyze image and video. Setting and configuring will be performed in the next section.

Introducing Amazon Rekognition

Amazon Rekognition is one of the Amazon services that is part of Amazon Machine Learning. You just register and activate your AWS account on this services. Amazon Rekognition can perform object and scene detection, image moderation, facial analysis, celebrity recognition, face comparison, text in image analysis, and video analysis...

Make predictive analytics for IoT data


Predictive analytics is a method to make prediction for an unknown event. In the context of IoT, we can develop predictive analytics to make a decision-based streaming sensor data. This is a part of machine learning study. In general, we can make predictive analytics using a diagram that is shown as follows:

Defining business problems is the first step to develop predictive analytics. Some problems probably need experts to make clear those problems. For instance, economics, biology, and volcanology. 

We also should prepare data in order to develop a model. This data should have high impact factors on the model.  When we develop a model, we also perform some steps such as defining targets, extracting derived features from data, fitting the model, and evaluating the model. In a real project, we probably make some iterations to ensure the corrected model.

After we developed the model, we can deploy the model into our system. This could be deployed in web...

Build a simple predictive analytics for your IoT project


In this section, we will develop a simple predictive analytics for IoT. Our project can be described in the following figure. We will perform sensing to acquire temperature and humidity from the sensor devices. Then, we send this sensor data to AWS Machine Learning to get a decision on whether the system will perform watering:

The project will focus on developing a machine learning model. Assume that we have temperature and humidity data from the sensor. We do not implement watering system, but we will make a decision system to trigger watering.

Next, we will implement the project with the following steps which are explained in detail in the upcoming sub-sections:

  1. Defining a machine learning model
  2. Preparing data
  3. Building a machine learning model
  4. Evaluating and testing a model

Defining a machine learning model

We will create a simple model for our project. We have two inputs—temperature and humidity. We also have historical data about sensor...

Summary


You learned several AWS Machine Learning services, such as Amazon Polly, Amazon Alexa, and Amazon Rekognition. Then, you also learned to build predictive analytics for IoT data.

In the next chapter, you will learn about AWS IoT security.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learning AWS IoT
Published in: Jan 2018Publisher: PacktISBN-13: 9781788396110
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Agus Kurniawan

Agus Kurniawan is an independent technology consultant, author, and lecturer. He has over 18 years' experience working on various software development projects, including delivering training courses and workshops, and delivering technical writing. He has done a few research activities related to wireless networking, software, and security in multiple universities. Currently, he is pursuing a Ph.D. program in Computer Science in Germany. He has previously written five books for Packt.
Read more about Agus Kurniawan