0% found this document useful (0 votes)
69 views

Computing Tools PDF

This document provides an introduction to TinyML and machine learning on edge devices. It discusses: 1) Why TinyML is important for running machine learning models locally on devices for low latency and privacy. TinyML allows running models on microcontrollers using little power. 2) Examples of TinyML applications including predictive maintenance, healthcare, agriculture, and ocean conservation. 3) Resources for getting started with TinyML including the Arduino Nano 33 BLE Sense hardware, TensorFlow Lite framework, and learning materials.

Uploaded by

Shubham N/A
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Computing Tools PDF

This document provides an introduction to TinyML and machine learning on edge devices. It discusses: 1) Why TinyML is important for running machine learning models locally on devices for low latency and privacy. TinyML allows running models on microcontrollers using little power. 2) Examples of TinyML applications including predictive maintenance, healthcare, agriculture, and ocean conservation. 3) Resources for getting started with TinyML including the Arduino Nano 33 BLE Sense hardware, TensorFlow Lite framework, and learning materials.

Uploaded by

Shubham N/A
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

UNIT 1

Introduction to Machine Learning on AI Hardware

1. Introduction to TinyML:
We are currently living in a world surrounded by
Machine Learning models. Over the course of your day,
you are utilising these models more than you realize.
Day to day tasks like scrolling through social media,
taking a picture, checking the weather, all depend on
machine learning models. You might even see this blog
because a machine learning model suggested this to
you.
We all know that training these models are
computationally expensive. But most of the times,
running inference on these models are
computationally expensive as well. The rate at which
we are using machine learning services, we need
computing systems that are fast enough to handle it.
Thus most of these models run on huge data centres
with clusters of CPUs and GPUs(even TPUs in some
cases).

Big is not always better


When you take a picture, you want the machine
learning magic to happen instantly. You don’t want to
wait for the image to be sent to a data centre where it

is being processed and sent back again. In this case,


you want the machine learning model to run locally.
When you say “Alexa” or “Ok, Google”, you want your
devices to respond to you instantly. Waiting for the
device to send your voice to the servers where it is
processed, and the information is retrieved. This takes
time and cripples the user experience. Again, in this
case, you want the machine learning model to run
locally.

What is TinyML
TinyML is a field of study in Machine Learning and
Embedded Systems that explores the types of models
you can run on small, low-powered devices like
microcontrollers. It enables low-latency, low power
and low bandwidth model inference at edge devices.
While a standard consumer CPUs consume between 65
watts and 85 watts and standard consumer GPU
(Graphics processing unit) consumes anywhere
between 200 watts to 500 watts, a typical
microcontroller consumes power in the order of

milliwatts or microwatts. That is around a thousand


times less power consumption. This low power
consumption enables the TinyML devices to run
unplugged on batteries for weeks, months, and in
some cases, even years, while running ML applications
on edge.

What is microcontroller:
1. A microcontroller is a compact integrated circuit
designed to govern a specific operation in
an embedded system. A typical microcontroller
includes a processor, memory and input/output (I/
O) peripherals on a single chip.Sometimes referred
to as an embedded controller or microcontroller
unit (MCU),microcontrollers are found in vehicles,
robots, office machines, medical devices, mobile
radio transceivers, vending machines and home
appliances, among other devices
How do microcontrollers work?
A microcontroller is embedded inside of a system to control
a singular function in a device. It does this by interpreting
data it receives from its I/O peripherals using its central
processor. The temporary information that the

microcontroller receives is stored in its data memory, where


the processor accesses it and uses instructions stored in its
program memory to decipher and apply the incoming data. It
then uses its I/O peripherals to communicate and enact the
appropriate action.

Microcontrollers are used in a wide array of systems and


devices. Devices often utilize multiple microcontrollers that
work together within the device to handle their respective
tasks.

For example, a car might have many microcontrollers that


control various individual systems within, such as the anti-
lock braking system, traction control, fuel injection or
suspension control. All the microcontrollers communicate
with each other to inform the correct actions. Some might
communicate with a more complex central computer within
the car, and others might only communicate with other
microcontrollers. They send and receive data using their I/O
peripherals and process that data to perform their
designated tasks.

Advantages of TinyML
• Low Latency: Since the model runs on the edge,
the data doesn't have to be sent to a server to run
inference. This reduces the latency of the output.
• Low Power Consumption: As we discussed
before, microcontrollers consume very little power.
This enables them to run without being charged
for a really long time.
• Low Bandwidth: As the data doesn’t have to be
sent to the server constantly, less internet
bandwidth is used.
• Privacy: Since the model is running on the edge,
your data is not stored in any servers.
Applications of TinyML
By summarizing and analyzing data at the edge on low
power devices, TinyML offers many unique solutions.
Even though TinyML is an emerging field, it has been
used in production for years. The “OK Google”,
“Alexa”, “Hey Siri” wake words are an example of
TinyML. Here, the devices are always on and are
analyzing your voice to detect the wake word. I’ll add
some more applications of TinyML here.
• Industrial Predictive Maintenance: Machines
are prone to fault. Using TinyML on low powered
devices, it is possible to monitor the machine and

predict faults ahead of time constantly. This


predictive maintenance can lead to significant cost
savings. Ping Services, an Australian startup, has
introduced an IoT device that autonomously
monitors wind turbines by magnetically attaching
to the outside of the turbine and analyzing
detailed data at the edge. This device can alert the
authorities regarding potential issues even before
it occurs.
• Healthcare: The Solar Scare Mosquito project
uses TinyML to curb the spread of mosquito-borne
diseases like Dengue, Malaria, Zika Virus,
Chikungunya, etc. It works by detecting the
mosquito breeding conditions and agitates the
water to prevent mosquito breeding. It runs on
solar power and can thus run indefinitely.
• Agriculture: The Nuru app helps farmers detect
diseases in plants just by taking a picture of it by
running Machine Learning models on the device
using TensorFlow Lite. Since it works on the
device, there is no need for an internet connection.
This is a crucial requirement for remote farmers
since they might not have proper internet
connection in their place.
• Ocean Life Conservation: Smart ML-powered
devices are used to monitor whales in real-time in

waterways around Seattle and Vancouver to avoid


whale strikes in busy shipping lanes.

How can I get started?

• Hardware: The Arduino Nano 33 BLE Sense is


the suggested hardware for deploying Machine
Learning models on edge. It contains a 32-bit ARM
Cortex-M4F microcontroller running at 64MHz
with 1MB of program memory and 256KB RAM.
This microcontroller provides enough horsepower
to run TinyML models. The Arduino Nano 33 BLE
Sense also contains colour, brightness, proximity,
gesture, motion, vibration, orientation,
temperature, humidity, and pressure sensors. It
also contains a digital microphone and a Bluetooth
low energy(BLE) module. This sensor suite will be
more than enough for most applications.
• Machine Learning Framework: There are only a
handful of frameworks that cater to TinyML needs.
Of that, TensorFlow Lite is the most popular and
has the most community support. Using
TensorFlow Lite Micro, we can deploy models on
microcontrollers.
• Learning Resources: Since TinyML is an
emerging field, there aren’t many learning

materials as of today. But there are a few excellent


materials like Pete Warden and Daniel
Situnayake’s book, “TinyML: Machine Learning
with TensorFlow Lite on Arduino and Ultra-Low-
Power”, Harvard University’s Course on TinyML
by Vijay Janapa Reddi, and Digikey’s blogs and
videos on TinyML.

Why TinyML:

Unit 2
Data Visualization: Data visualization is the graphical
representation of information and data in a pictorial or graphical
format(Example: charts, graphs, and maps). Data visualization
tools provide an accessible way to see and understand trends,
patterns in data and outliers. Data visualization tools and
technologies are essential to analyze massive amounts of
information and make data-driven decisions. The concept of
using pictures is to understand data has been used since
centuries. General types of data visualizations are Charts,
Tables, Graphs, Maps, Dashboards.

Bene ts Identify areas that need attention or


improvement
Clarity which factors in uence customer
behavior
Helps understand which products to places
where
Use The goal of the data visualization is to communicate
d information clearly and ef ciently to users by
fo presenting them visually.

Relation Data visualization helps to get better perception.

Indust Data Visualization technologies and techniques are


ries widely used in Finance, Banking, Healthcare,
Retailing etc
Tools Plotly, DataHero, Tableau, Dygraphs, QlikView,
ZingCHhart etc.
r

fi
 

fl
fi

Platfor Big data processing, Service management


ms dashboards, Analysis and design.
Techniques Data visualization can be static or interactive.

Performed by Data Engineers

Data Analytics: Data analytics is the process of analyzing data


sets in order to make the decision about the information they
have, increasingly with specialized software and system. Data
analytics technologies are used in commercial industries that
allow organizations to make business decisions. Data can help
businesses better understand their customers, improve their
advertising campaigns, personalize their content, and improve
their bottom lines. The techniques and processes of data
analytics have been automated into mechanical processes and
algorithms that work over raw data for human consumption.
Data analytics help a business optimize its performance.

Bene t Identify areas that Identify the underlying


s need attention or models and patterns
improvement Acts as an input source for
Clarity which factors the Data Visualization,
in uence customer
Helps in improving the
behavior
business by predicting the
Helps understand needs Conclusion
which products to
places where
fl
fi
 

Used The goal of the data Every business collects


for visualization is to data; data analytics will
communicate help the business to make
information clearly more-informed business
and ef ciently to users decisions by analyzing the
Relatio Data visualization Together Data
n helps to get better visualization and analytics
perception. will draw the conclusions
about the datasets. In few
scenarios, it might act as a
Industr Data Visualization Data Analytics
ies technologies and technologies and
techniques are widely techniques are widely
used in Finance, used in Commercial,
Tools Plotly, DataHero, Trifecta, Excel /
Tableau, Dygraphs, Spreadsheet, Hive,
QlikView, ZingCHhart Polybase, Presto, Trifecta,
etc. Excel /Spreadsheet, Clear
Platfor Big data processing, Big data processing, Data
ms Service management mining, Analysis and
dashboards, Analysis design
and design.
Techni Data visualization can Data Analytics can be
ques be static or Prescriptive analytics,
interactive. Predictive analytics.
Perfor Data Engineers Data Analysts
med

Bene ts of Good Data Visualization


fi
fi
Since our eyes can capture the colors and patterns,
therefore, we can quickly identify the red portion from blue,
square from the circle, our culture is visual, including
everything from art and advertisements to TV and movies

So, Data visualization is another technique of visual art that


grabs our interest and keeps our main focus on the
message captured with the help of eyes

Whenever we visualize a chart, we quickly identify the


trends and outliers present in the dataset

The basic uses of the Data Visualization technique are as


follows

• It is a powerful technique to explore the data


with presentable and interpretable results
• In the data mining process, it acts as a primary step in
the pre-processing portion
• It supports the data cleaning process by nding
incorrect data and corrupted or missing values
• It also helps to construct and select variables, which
means we have to determine which variable to include
and discard in the analysis
• In the process of Data Reduction, it also plays a
crucial role while combining the categories
:

fi
.

Different Types of Analysis for Data


Visualization
Mainly, there are three different types of analysis for Data
Visualization

Univariate Analysis: In the univariate analysis, we will be


using a single feature to analyze almost all of its properties

Bivariate Analysis: When we compare the data between


exactly 2 features then it is known as bivariate analysis

Multivariate Analysis: In the multivariate analysis,


we will be comparing more than 2 variables

Univariate Analysis Techniques for Data


Visualization
1. Distribution Plot
• It is one of the best univariate plots to know about the
distribution of data
• When we want to analyze the impact on the target
variable(output) with respect to an independent
variable(input), we use distribution plots a lot
• This plot gives us a combination of both probability
density functions(pdf) and histogram in a single plot
Implementation:

• The distribution plot is present in the Seaborn package


The code snippet is as follows
:

sns.FacetGrid(hb,hue='SurvStat',size=5).map(sns.di
stplot,'age').add_legend()

Some conclusions inferred from the above distribution


plot:

From the above distribution plot we can conclude the


following observations

• We have observed that we created a distribution plot on


the feature ‘Age’(input variable) and we used different
colors for the Survival status(output variable) as it is
the class to be predicted
• There is a huge overlapping area between the PDFs for
different combinations
.

• In this plot, the sharp block-like structures are called


histograms, and the smoothed curve is known as the
Probability density function(PDF)
NOTE: 

The Probability density function(PDF) of a curve can help us


to capture the underlying distribution of that feature which is
one major takeaway from Data visualization or Exploratory
Data Analysis(EDA)

2. Box and Whisker Plot


• This plot can be used to obtain more statistical
details about the data
• The straight lines at the maximum and minimum are
also called whiskers
• Points that lie outside the whiskers will be considered
as an outlier
• The box plot also gives us a description of the 25th,
50th,75th quartiles
• With the help of a box plot, we can also determine
the Interquartile range(IQR) where maximum details
of the data will be present. Therefore, it can also give
us a clear idea about the outliers in the dataset
.

Fig. General Diagram for a Box-plo

Implementation:


Boxplot is available in the Seaborn library

Here x is considered as the dependent variable and y is
considered as the independent variable. These box
plots come under univariate analysis, which means
that we are exploring data only with one variable
• Here we are trying to check the impact of a feature
named “axil_nodes” on the class named “Survival
status” and not between any two independent
features
The code snippet is as follows

sns.boxplot(x='SurvStat',y='axil_nodes',data=hb)
.

Some conclusions inferred from the above box plot:

From the above box and whisker plot we can conclude the
following observations

• How much data is present in the 1st quartile and how


many points are outliers etc
• For class 1, we can see that it is very little or no data is
present between the median and the 1st quartile
• There are more outliers for class 1 in the feature
named axil_nodes
NOTE:

We can get details about outliers that will help us to well


prepare the data before feeding it to a model since outliers
in uence a lot of Machine learning models

3. Violin Plot
fl
.

• The violin plots can be considered as a combination of


Box plot at the middle and distribution plots(Kernel
Density Estimation) on both sides of the data
• This can give us the description of the distribution of the
dataset like whether the distribution
is multimodal, Skewness, etc
• It also gives us useful information like a 95%
con dence interval

Fig. General Diagram for a Violin-plo

Implementation:

• The Violin plot is present in the Seaborn package


The code snippet is as follows

sns.violinplot(x='SurvStat',y='op_yr',data=hb,size
=6)

fi
.

Some conclusions inferred from the above violin plot:

From the above violin plot we can conclude the following


observations

• The median of both classes is close to 63


• The maximum number of persons with class 2 has
an op_yr value of 65 whereas, for persons in class1,
the maximum value is around 60
• Also, the 3rd quartile to median has a lesser number of
data points than the median to the 1st quartile
Bivariate Analysis Techniques for Data
Visualization
1. Line Plot
• This is the plot that you can see in the nook and
corners of any sort of analysis between 2 variables
• The line plots are nothing but the values on a series of
data points will be connected with straight lines
:

• The plot may seem very simple but it has more


applications not only in machine learning but in many
other areas
Implementation:

• The line plot is present in the Matplotlib package


The code snippet is as follows

plt.plot(x,y)

Some conclusions inferred from the above line plot:

From the above line plot we can conclude the following


observations
.

• These are used right from performing distribution


Comparison using Q-Q plots to CV tuning using
the elbow method
• Used to analyze the performance of a model using
the ROC- AUC curve
2. Bar Plot
• This is one of the widely used plots, that we would have
seen multiple times not just in data analysis, but we use
this plot also wherever there is a trend analysis in many
elds
• Though it may seem simple it is powerful in analyzing
data like sales gures every week, revenue from a
product, Number of visitors to a site on each day of
a week, etc
Implementation:

• The bar plot is present in the Matplotlib package


The code snippet is as follows

plt.bar(x,y)
fi
.

fi
.

Some conclusions inferred from the above bar plot:

From the above bar plot we can conclude the following


observations

• We can visualize the data in a cool plot and can convey


the details straight forward to others
• This plot may be simple and clear but it’s not much
frequently used in Data science applications
3. Scatter Plot

It is one of the most commonly used plots used for
visualizing simple data in Machine learning and Data
Science
• This plot describes us as a representation, where each
point in the entire dataset is present with respect to any
2 to 3 features(Columns)
• Scatter plots are available in both 2-D as well as in 3-D.
The 2-D scatter plot is the common one, where we will
primarily try to nd the patterns, clusters, and
separability of the data
Implementation:

• The scatter plot is present in the Matplotlib package


The code snippet is as follows

plt.scatter(x,y)
.

fi

Some conclusions inferred from the above Scatter plot:

From the above Scatter plot we can conclude the following


observations

• The colors are assigned to different data points based


on how they were present in the dataset i.e, target
column representation. 
• We can color the data points as per their class label
given in the dataset
:

Unit 5

1. https://docs.microsoft.com/en-us/azure/cloud-adoption-
framework/ready/azure-best-practices/ai-machine-learning-
mlops
2. https://www.toolbox.com/tech/innovation/articles/top-open-
source-arti cial-intelligence-software/

3. https://www.ibm.com/in-en/cloud/learn/devops-a-complete-
guide

Unit 4

1. https://www.geeksforgeeks.org/distributed-database-system/
2. https://www.techtarget.com/searchoracle/de nition/
distributed-database

https://cs.uwaterloo.ca/~tozsu/courses/cs856/F02/lecture-1-
ho.pdf
:

fi
fi

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy