You are on page 1of 68

Introduction to

AI and ML
Michael Melese (Ph.D.)
michael.melese@aau.edu.et
Wednesday, January 3, 2024

Outline

◼ AI

◼ Why AI now ?
◼ What is ML ?
◼ Why ML ?
◼ How ML solve
◼ ML methods
◼ Machine learning steps
◼ Machine Learning evaluation
◼ What ML can do ?
◼ Application area of ML.

Wednesday, January 3, 2024

AI
❑ Is a discipline that researches and develops
theories, methods, technologies, and application
for simulating the extension and expansion of
human intelligence.
❑ Consist of two words Artificial and Intelligence,
“man-made” and “thinking power”, hence AI
means “a man-made thinking power.”

❑ AI is a discipline that researches and develops
theories, methods and technologies in addition to
simulating the extension and expansion of human
intelligence.
❑ The goal is to let machines perform complex tasks
that require intelligent humans to complete.
Why AI now?

◼ The amount of data generated by the typical modern


business increases, so does the prominence of AI
expert hired by organizations to help them turn raw
data into valuable business information.
◼ Data extraction is the act of retrieving specific data
from unstructured or poorly structured data sources for
further processing and investigation.
◼ AI is now changing the world through a better
forecasting.


500

# in Million
2,910
3,000

2,750
2,562 300
2,500 250

2,250
2,000
2,000

1,750
1,478
1,500
1,263
1,250
1,000 988
1,000

750

600 574 573 573 550


557 444 436 430
0 FB
YouTube WhatsAp Instagram WeCha
t Douyin QQ Sina Wei Kuaishou Telegram Pinterest Reddit* Quora*
Facebook p Messenge
r bo Twitter
TikTok Snapchat

◼ Data-driven decisions are more profitable. Every


minute,
❖ Americans use 2,657,700 GB of data
❖ Instagram users post 46,750 photos
❖ 15,220,700 texts are sent in the form of Email/SMS and
❖ Google conducts 3,607,080 searches.
◼ 2.5 quintillion bytes of data is produced every day
18 18
(2.5* 10 ) expecting 463 exabytes (*10 ) of data
will be generated each day by people as of 2025.

The main reasons for these vast popularity of AI


are;
❖ More computing power:
❖ AI requires a lot of computing power, recently many advances
have been made and complex deep learning models can uses GPUs
and
TPUs.
❖ More data
❖ AI trained on large data enables us to do more efficiently.
❖ Better algorithms
❖ The state-of-the-art is providing better results.
❖ Broad investment
❖ Universities, governments, startups and giant tech company
(Google, Amazon, Facebook, Baidu, Microsoft) are all
investing heavily in AI.

AI Fields

Machine Machine Learning


Planning Learning Enables to predict/forecast the outcomes
without being explicitly programmed.
Robotics Explores the process using autonomous
techniques to solve planning and scheduling
problems.
Design, construction, and use of machines to
perform tasks done traditionally by human
NLP
beings. This require embedded system, sensor, NLP NLP focuse in helping computers to
distributed AI, , CV, ML, NLP, planning, understand the way that humans communicate.
navigation, etc.

Robotics
Speech Expert System
Deals with AI task that intersect with speech Expert Used to emulates the decision-making ability
processing task for interation with different System of a human expert using machine.
systems.

Speech
Game
Vision
Provides powered interactive experiences
Trains computers to capture and interpret Game generated through non player characters.
information from image and video data.

Planning
Vision

Machine Learning
NLP

Extraction Monitoring
Spell and
Topic Auto Correct
Grammar
Modeling Document
Checke
r
Information Classificatio
Social Media n

NLP
Character
NE Translation
R WS Recognition
D
ChatbotsDocument
Language Summarization
Language
Detection

Speech
Synthesis

Recognition
Speech
Based task
Command Control Speech Search

Dialog

Automated Calling

Vision
snap. For instance, pick a landscape where we distinct categories with a few examples of each
can see people, roads, cars, and tresses. image and expand learning algorithms..
Delineating the boundaries of each object from
the dense pixel predictions from the models. Object Tracking
Object Detection Tracking a particular object of interest or
multiple items in video and real-world
interactions where observations are made
following initial object detection.

Identify objects within images individual items


which differs from the classification task by
using classification and localization to many
objects instead of a single dominant object. 05
Instance
02 04 03
Semantic Segmentation
01
Segmentation Image Classification Identifying individual objects within semantic
segmentation (multiple objects with in single
Attempt to understand the role of each pixel in a category).
A data-driven approach to classify images into

Robotics

Manu ac ur n
Military f t i g
Underwate
r
Exploratio
Exploration n

Space
Care
Entertainmen Health
t

Securit
y

Agriculture

AI application Area
AI for Business

and travel & Management

AI
Fraud
Banking Hate Management Image
Speech
Inventory
Telecom
Recognition

&
Detection
Financial Inc den
i t
BIG
firms
Fake
de ec o
t ti n Premium
DATA F
inancial data
Supply Chains
estimation
New
s
Demand
Insurance Forecasting
and approva
Community l

detectio
n
Social
Health
Monitoring m m Loan pred c on
Automation anage ent i ti

FinTech
medi RO
a detection I
Adver s n Automated Seve y
ti i g rit Early disease Forecasting
Automated data
c ass ca o
collection manufacturing l ifi ti n

What is ML?

◼ ML is an application of AI that provides


systems the ability to learn and improve
automatically from experience without being
explicitly programmed.
▪ The process of learning begins with observations or
data in order to look for patterns in data and make
better decisions in the future based on the examples
that we provide.
▪ As intelligence requires knowledge, it is necessary
for the computers to acquire knowledge.
Wednesday, January 3, 2024

◼ The primary aim ML is to allow the computers


learn automatically without human
intervention or assistance and adjust actions
accordingly.
Wednesday, January 3, 2024

How ML Solve …

◼ Mathematics and Statistical knowledge


enable to view the data through a quantitative
lens. There are textures,
dimensions, and
correlations in data that can be
expressed
mathematically.
◼ Technology and Hacking skill is required for
a data scientists utilize technology in order to
wrangle enormous data sets and work with
complex algorithms, and it requires tools far
more sophisticated than Excel.
▪ Data scientists need to be able to code
prototype quick solutions, as well as integrate
with complex data systems through different
program.
◼ Domain expert is another important for a data
scientist to be a tactical business consultant to
work closely with data.

Wednesday, January 3, 2024


◼ Being the study of where information comes from, what it
represents and how it can be turned into a valuable resource
in the creation of business and IT strategies.
▪ Mining large amounts of structured and unstructured data
to identify patterns can help an organization rein in costs,
increase efficiencies, recognize new market opportunities
and increase the organization's competitive advantage.
◼ Along with managing and interpreting large amounts of data,
many data scientists are also tasked with creating data
visualization models that help illustrate the business value of
digital information.

Wednesday, January 3, 2024


◼ Data scientists/expert draw the digital information they are
studying from a growing list of channels and sources,
including
▪ Smartphones,
▪ Internet of things (IoT)
devices,
▪ Social media,
▪ Surveys,
▪ Purchases,
▪ Internet searches and behavior
◼ By sorting through these large data, data scientists can identify
patterns to solve problems through the analysis of bigdata.
Wednesday, January 3, 2024
Data
◼ Data are raw facts and figures that on their own have no
meaning. (e.g. readings from sensors, survey facts, etc) ◼ Data
can be numbers, words, letters, images, sound etc.
Wednesday, January 3, 2024


Wednesday, January 3,

2024

Can you understand these ?


Yes, Yes, No, Yes, No, Yes, No, Yes
42, 63, 96, 74, 56, 86,?
111192, 111234

◼ None of the above data have any meaning until they


are given a CONTEXT and PROCESSED into a
useable form
▪ Thus we need to process data in to information to
make it meaning full and important.

Wednesday, January 3, 2024

Data into Information


◼ To achieve its aims the organisation will need to process
data into information.
◼ Data needs to be turned into meaningful information and
presented in its most useful format
◼ Data must be processed in a context in order to give it
meani Temperature
(Celsius)
ng. 40
39
38 08:00 09:30
37
36 08:30 10:00

09:00 10:30

Time

Wednesday, January 3, 2024


◼ To turn data into information it needs to be processed. Processing


Information
Data

Wednesday, January 3, 2024

◼ Information is data that has been processed by a computer


system to give it meaning.
◼ Processed can mean:
▪ Having calculations performed on it
▪ Converted to give it meaning
▪ Organized in some way

Wednesday, January 3, 2024

Example 1
Yes, Yes, No, Yes, No, Yes,
No, Yes, No, Yes, Yes

Raw Data

Context ???? Processing

Information
????

Wednesday, January 3, 2024

Example 2
35.8, 36.2, 37.0, 38.4, 37.1, 35.8,
36.2, 37.0, 38.4, 37.0, 38.4, 37.1

Raw Data
??????????
Context

Processing
??????????
Information

Wednesday, January 3, 2024

Example 3
100519

Raw Data
????

Context

Processing

Information
????
030219,

Wednesday, January 3, 2024


Example
Wednesday, January 3, 2024


Wednesday, January 3, 2024

Data vs Information
Data Information

something simple and organized, structured or


Meaning seemingly random and presented in a given
Data is raw, unorganized useless until it is context so as to make it
facts that need to be organized. useful, it is called
processed. Data can be information.
When data is processed,

Example Each student's test score is one


piece of data.
Wednesday, January 3, 2024
The average score of a class or of the
entire student that can be derived from the
given raw data
ML Methods

◼ Machine learning focus on how to learn the


rules from examples automatically and
apply on new instances either using
supervised or unsupervised technique.
▪ ML algorithms are often categorized as
supervised or unsupervised.
Machine
Data or
Output based
Information
Learning system
on input data

Wednesday, January 3, 2024

◼ ML may follow one of the following


techniques
▪ Supervised
▪ Unsupervised
▪ Semi supervised
▪ Reinforcement
Wednesday, January 3, 2024

Supervised ML

◼ Uses what has been learned in the past labeled data


to predict future events.
▪ Starting from the analysis of a known training data, the
learning algorithm produces an inferred function to
make predictions about the output values. The system is
able to provide targets for any new input after sufficient
training.
◼ The learning algorithm can also compare its output
with the correct, intended output and find errors in
order to modify the model accordingly.
Wednesday, January 3, 2024

Unsupervised ML

◼ Used when the data or information used to


train is neither classified nor labeled.
◼ Unsupervised learning studies how systems
can infer a function to describe a hidden
structure from unlabeled data.
◼ The system doesn’t figure out the right output,
but it explores the data and can draw
inferences from datasets to describe hidden
structures from unlabeled data.
Wednesday, January 3, 2024

Semi-Supervised ML

◼ Semi-supervised
learning fall somewhere in
between supervised and unsupervised learning. ▪
Use both labeled and unlabeled data for training. ▪
Typically a small labeled data and a large amount of
unlabeled data. The systems able to considerably
improve learning accuracy through learning.
◼ Semi-supervised learning is chosen when the
acquired labeled data requires skilled and
relevant resources in order to learn from it.
Wednesday, January 3, 2024

Reinforcement Learning

◼ Interactswith its environment by producing actions


and discovers errors or rewards.
◼ Trial and error search and delayed reward are the most
relevant characteristics of RL. Two main types of
reward are:
▪ Positive reward
▪ Encourages continuing performance a particular
sequence. ▪ Negative reward
▪ Penalizes for performing certain activities and urges to
correct the algorithm to stop.
Wednesday, January 3, 2024

ML steps

◼ Machine learning has 7 basic steps


▪ Gathering data
▪ Data preparation or representation
▪ Model selection
▪ Training
▪ Evaluation
▪ Parameter tuning
▪ Prediction

Wednesday, January 3, 2024

Data Gathering
◼ The quantity &
quality of your
data
dictate how
accurate
our model is.
◼ The outcome of this
step is
generally a
representation
of data.
▪ Some of the
pre
collected data
such as
Kaggle and UCI.
Wednesday, January 3, 2024

Data Preparation

◼ Clean data which may require remove duplicates,


correct errors, deal with missing values,
normalization, data type conversions and etc.
◼ Randomize data, which erases the effects of the
particular order in which we collected and/or
otherwise prepared our data
◼ Visualize data to help detect relevant relationships
between variables or class imbalances, or perform
other exploratory analysis
◼ Split into training and evaluation sets
Wednesday, January 3, 2024

Model Selection

◼ Different machine
learning
algorithms are
there for different
tasks
and application;
▪ Clustering,
▪ Classification,
▪ Collaboration,
▪ Regression and
▪ Dimensional reduction.
◼ Select the right one.
Wednesday, January 3, 2024

Training

◼ Thegoal of training is to answer a question or


make a prediction correctly as often as possible.
▪ Linear regression example: algorithm would need to learn
values for m (or W) and b (x is input, y is output).
◼ Each iteration of process is a training step. Wednesday, January

3, 2024

Evaluation

◼ Uses metric or combination of metrics to "measure"


objective performance of model.
▪ Test the model against previously unseen data.
◼ Good train/evaluation split? 80/20, 70/30, or similar,
depending on domain, data availability, dataset
particulars, etc.
Wednesday, January 3, 2024

Parameter Tuning

◼ Tune the model parameters for improved


performance of machine learning.
◼ Simple model hyperparameters may include:
number of training steps, learning rate,
initialization values and distribution, etc.

Wednesday, January 3, 2024

Prediction

◼ Using further (test set) data which have, until


this point, been withheld from the model (and
for which class labels are known), are used to
test the model; a better approximation of how
the model will perform in the real world.

Wednesday, January 3, 2024

◼ The evaluation metric to use depends heavily on the


task at hand. However, the followings are the major
evaluation metric for ML.
▪ Confusion matrix
▪ Accuracy
▪ Precision
▪ Recall
▪ Specificity
▪ F1 score
▪ ROC (Receiver Operating Characteristics) curve

Wednesday, January 3, 2024

Confusion Matrix

TP Predicted
positive and are
actually positive. negative.

FN Predicted negative TN Predicted negative


and are actually and are actually
positive. negative.
FP Predicted positive
and are actually

Wednesday, January 3, 2024


how much the model is
the correctness of a single right when it says it is
measurement right

Accuracy Precision F1 score It is the


harmonic mean
of precision and recall.

similar to recall but the shift


how much extra right ones, is on the negative instances.
the model missed when it
showed the right ones

Recall/Sensitivity/TPR Specificity

Wednesday, January 3, 2024

What ML can do?


◼ Predicting iceberg paths: this occasionally requires icebergs to be
towed to avoid collisions
◼ Oil wells drilling optimization: how to digg as few test wells as
possible to detect the entire area where oil can be found
◼ Predicting solar flares: timing, duration, intensity and
localization
◼ Predicting Earthquakes
◼ Predicting very local or global weather; reconstructing past
weather (like 200 million years old)
◼ Predicting Mars weather to identify best time and spots to land.
◼ Predict riots based on tweets
Wednesday, January 3, 2024

◼ Designing metrics to predict student success, or employee


attrition
◼ Predicting book sales, determining correct price, price
elasticity and whether a specific book should be accepted or
rejected by a publisher, based on projected ROI
◼ Predicting volcano risk, to evacuate populations or cancel
flights, while minimizing expenses caused by these decisions ◼
Predicting 500-year floods, to build dams
◼ Predict death, and health expenditures, to compute your
premiums (based on which population segment you belong
to)
Wednesday, January 3, 2024

◼ Predicting reproduction rate in animal populations


◼ Predicting food reserves each year (fish, meat, crops including
crop failures caused by diseases or other problems).
◼ Electricity, gas, water consumption and other modern
products.
◼ Predicting longevity of a product, or a customer
◼ Predicting duration, extent and severity of draught or fires ◼
Predicting racial and religious mix in a population, detecting
change point to adapt policies accordingly

Wednesday, January 3, 2024

◼ Predicting new flu viruses to design efficient vaccines each


year
◼ Road constructions and traffic lights designed to optimize
highway traffic.
◼ Google algorithm to predict duration of a road trip, doing
much better than GPS systems not connected to the Internet. ◼
Spell checks, especially for people writing in multiple languages
◼ Distinguishing between noise and signal on millions of
pictures or videos, to identify patterns
◼ Automated piloting (drones, cars without pilots)
Wednesday, January 3, 2024

◼ Customized, patient-specific medications and diets


◼ Predicting and legally manipulating elections
◼ Sport bets
◼ Predicting oil demand, oil reserves, oil price, impact of coal
usage
◼ Predicting chances that a container in a port contains a nuclear
bomb
◼ Computing correct average time-to-crime statistics for an
average gun (using censored models to compensate for the
bias caused by new guns not having a criminal history
attached to them)

Wednesday, January 3, 2024

Application of ML

◼ ML applications in different area;


▪ Drug Discovery/Manufacturing.
▪ Fraud Detection.
▪ Retail for Product Recommendations.
▪ Retail for Improved Customer Service.
▪ How does Uber determine the price of your ride.
▪ How does minimize the wait time once you book a car. ▪
Personalizing news feed to rendering targeted ads NETFLIX.
▪ Text classification and summarization.

Wednesday, January 3, 2024

You might also like