MLcan quickly identify an anomaly through its “learning” and notify the users’ family in case of
any health issue. For entertainment, they can be used for instance like the Google Glass to show
relevant content by going through the past history of their owners.
Smart Cities
IoT has been heavily used by governments for envisioning smart cities. This includes utility
management, automated transportation, surveillance, and environmental monitoring. Some
of its real-life examples are.
IoT-based sensors can help in the identification of parking slots over the city. Similarly,
ML can learn about the patterns of parking and provide insights for opportunities,
thereby reducing the parking conundrum for metropolitans.
To address trac congestion, IoT-based sensors can use ML to identify the busiest city
points for dierent timings. Thus, these patterns can help drivers to plan their daily
journeys and improve them considerably.
IoT-based equipment can monitor the environment and utilize machine learning to
predict any unforeseen pollution issue.
MACHINE LEARNING MODELS
One of the jargons that you would continuously come across in the Machine Learning realm is
the “model”. As you know, Machine Learning involves learning via large datasets. The bigger the
dataset is, the better ML becomes, that is, it is more synced with the reality. You can think of the
use of ML datasets as “modeling reality”.
Humans are naturally not gifted with the ability to go over millions of samples and calculate
the possibilities and predictions from these samples. For example, if you analyze the results of
the last 10 years of global economics, can you calculate and identify patterns to predict the
next economic crash? Obviously, you cannot. This is why we are training computers to learn.
Consider a dataset as the representation of reality. Now if we divide our dataset completely, then
each record is a representation of reality.
To understand further, suppose we have to calculate the possibility of diabetes. Now our
dataset stores data of the patient history and other multiple factors. By picking an individual sample
from our project, we have a person. Now, they can have attributes like their age (attribute) is more
than 50, their gender (attribute) is female, and they have a family history (attribute) of diabetes.
Another sample can have an individual who is less than 50, is male, and has no prior
family history for diabetes. Similarly, you can have the following listed table. Now, we will
add the most important attribute in our column that is, if the person contracted diabetes. As
ML predictions are based on historical data, therefore it is necessary to get this knowledge.
Gender <50 Family History Diabetes
F Yes No No
M No Yes Yes
F Yes No Ye s
M No Yes No
M No Yes Yes
F Yes No No
Chapter 10 Data Analytics and Machine Learning for IoT
253
Internet_of_Things_CH10_pp249-270.indd 253 9/3/2019 10:15:56 AM
In this table, we have supposedly presented a complete representation of reality. Now, we can
just use the if-statement to make a condition like the following.
if (gender = = F) && age < 50 && history = = yes){
diabetes = true;
}
This means that by going over the attributes of the table, our system follows a rule where
only those patients are diabetic who are female, are aged less than 50, and have a family history
of diabetes.
Win or Lose
Per
centage of votes
Election Candidat
e
Election Candidat
e
CLASSIFICATION
REGRESSION
Load
Sensor
Data
Extract
Features
Sensor Data
Aggregation
Platform
Machine Learning Process
Develop
Model
Test
Model
Predict
Using
Model
254 Internet of Things
Internet_of_Things_CH10_pp249-270.indd 254 9/3/2019 10:15:57 AM

Get Internet of Things now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.