0% found this document useful (0 votes)
16 views27 pages

Lect 1,2

This document discusses machine learning. It provides an introduction to machine learning, including what machine learning is, applications of machine learning, and types of machine learning. It also discusses the course code and unit 1 for an introduction to machine learning class, which covers what machine learning is.

Uploaded by

asmithaboddu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views27 pages

Lect 1,2

This document discusses machine learning. It provides an introduction to machine learning, including what machine learning is, applications of machine learning, and types of machine learning. It also discusses the course code and unit 1 for an introduction to machine learning class, which covers what machine learning is.

Uploaded by

asmithaboddu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Machine Learning

• Course Code:
Deep
Learning • Unit 1: Introduction to Machine Learning
Machine • Lecture 1: What is Machine Learning?
Learning
ML applications
Artificial Types of ML
Intelligence

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Make a Machine differentiate Elephants from Dogs?

Machine Elephant OR Dog?

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Make a Machine differentiate Elephants from Dogs
Distribution of Weight vs Height

400

300

Height (in cms)


200

20

15

10

10 20 30 1000 4000
Weight (in Kgs)

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Make a Machine differentiate Elephants from Dogs: Simply Threshold
Distribution of Weight vs Height

400 Elephants

300

Height (in cms)


200

20 Dogs Threshold
15

10

10 20 30 1000 4000
Weight (in Kgs)

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Differentiate 100 species of Moths with Simple Threshold?

Make Machine
Intelligent !

Amity Centre for Artificial Intelligence, Amity University, Noida, India


AI is the science of making machines do things
that would require intelligence if done by men
Artificial Intelligence
• Any technique which enables computers to mimic
human behavior

Machine Learning
• Subset of AI Techniques which use Statistical Methods to
Enable Machines to Improve with Experiences

Deep Learning
• Subset of ML which make the Computation of Multi-layer
Neural Networks Feasible

Amity Centre for Artificial Intelligence, Amity University, Noida, India


What is Machine Learning?
One of the Earliest definition of Machine
Learning:

Arthur Samuel (1959):


“Field of study that gives
computers the ability to learn
without being explicitly
programmed.” On February 24, 1956, Arthur Samuel’s Checkers
program was developed for play on the IBM 701, In 1962,
The Samuel Checkers-playing Program was Self-proclaimed checkers master Robert Nealey played the
among the world's first successful self- game on an IBM 7094 computer. The computer won. It is
learning programs, and as such a very early still considered a milestone for artificial intelligence, as an
demonstration of the fundamental
concept of artificial intelligence. example of the capabilities of an electronic computer.
Courtesy: ibm.com

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Machine Learning vs Process Automation

Process Automation Machine Learning

Follow orders, Pre-programmed Rules to run Mimic human-ability to think and do, Machine
a process, Monotonous, Repetitive process seeks patterns, adapts with experience
Amity Centre for Artificial Intelligence, Amity University, Noida, India
Machine Learning imparts abilities beyond human capability!

Learn Process
Complex Large
Automatic Disease Detection Tasks Data
https://doi.org/10.1016/j.media.2014.04.006 Process 1000’s of
Images Simultaneously

Learn from Learn


complex long-term
data Information

Auto-analyse EEG (brain) signals Trend Analysis


https://doi.org/10.1007/978-3-030-63823-8_6

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Human Perception vs. Machine Learning
Capture Data -> Process -> Interpret
Human Vision System Human Auditory System

Computer Vision System Computer Auditory System

Mic

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Consider an Example of Computer Vision

Aim: Early Detection of Osteoporosis Similar Visual Information


Computationally Different
• Osteoporosis is a chronic disease characterized by
progressive bone loss and changes at microstructural Worldwide, 1 in 3 women
levels resulting in increasing bone weakness and and 1 in 5 men will
experience osteoporotic
fragility. fractures in their lifetime.
• Current Practice: Conventionally, Dual-Energy X-ray Absorptiometry (DEXA) Control Subject Osteoporosis
Patient
is used, which is costly and is not available in small towns and villages. DEXA
• Domain Transformations
machine which is available only to 0.26/million population in India. • Computation Algorithms
• Computer Vision
Question: Can we assess bone quality parameters on X-ray radiographs?
Optimizations and Parameter
Answer: Yes ! Using Computer Vision on X-ray Images Tuning for final Framework

Human Eye: Views Spatial Information in 2D


Final Automatic Diagnostic tool
Computer Vision: Can go Beyond Human Vision! based on the most optimized
performance.

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Classification of the Trabecular Bone Structure of Osteoporotic
Patients using Machine Vision
Features Extraction Classification Methods
Supervised Machine Learning
Table: Features (Principal components) and their corresponding p-values The discriminatory feature vectors (first and second PCs) were used to separate healthy X-ray images from
(after reduction using PCA)
osteoporotic ones using different classifiers. The four most popular classification algorithms, namely Support
Osteoporotic patients
Healthy subjects Vector Machine (SVM), Naive Bayes classifier , Artificial Neural Network (ANN) and k-Nearest
Features (mean ± std. p- values
(mean ± std. deviation) Neighbors (k-NN) classifier, were applied to the first two principal components.
deviation)
(-4.02E-006) ± (6.47E- (4.01E-006) ± (6.85E- Bone X-ray image database considered in this study Performance of the classifiers with feature processing
PC 1 1.69E-006
006) 006)
Bone X-ray #Samples for Total Sensitivit Specificity Accurac
(-1.80E-006) ± (4.06E- (1.80E-006) ± (2.83E- #Samples for testing Classifiers
y (%) (%) y (%)
PC 2 2.24E-005 image training samples
006) 006)
SVM 100 95.74 97.87
(-2.62E-008) ± (1.10E- (2.61E-008) ± (1.96E- Healthy
40 47 87
PC 3 0.0013 Subjects Naive Bayes 97.87 93.61 95.74
007) 007)
Osteoporotic
(-1.63E-012) ± (8.32E- (1.63E-012) ± (9.52E- 40 47 87 k-NN 95.74 97.87 96.80
PC 4 0.8663 Patients
011) 011) Total 80 94 174 ANN 97.87 95.74 96.80
(-4.79E-012) ± (1.64E- (4.79E-012) ± (2.40E-
PC 5 0.6834
011) 011)
(7.84E-014) ± (2.78E- (-7.82E-014) ± (2.63E-
PC 6 0.8436
012) 012)
Table: Linear combinations of the original features that generate
the principal components PC1 and PC2

Principal Components (PCs)


Features
PC1 PC2
Statistical Mean -0.5160 -0.4609
Features Std. deviation -0.3014 0.8533
Contrast 0.8017 0.0268
Texture Correlation 0.0052 -0.1397
Features Energy 0.0052 -0.1397
Homogeneity 0.0052 -0.1397

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Traditional Learning vs. Machine Learning

Traditional Learning Machine Learning

Data Training Expected Trained Test


Program Output Model
Data Data

Processing Unit Processing Unit Processing Unit

Output Trained
Output
Model

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Formal Definition of Machine Learning
“A computer program is said to learn Task
from experience E with respect to some • What is to be done?
Prediction/ Clustering
task T and performance measure P if its
performance at tasks in T, as measured Experience
by P, improves with experience E.” • Data– Images, time-
series, predictors

Tom M. Mitchel (1998)


Performance
• Quantitative measure
of performance.

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Example of Machine Learning: Email Classification
Experience/Data Task Performance
Lots of Classify as Correct Prediction 2
=
labelled e-mails Spam/Not Spam Total Number of Prediction 3
NOT SPAM

NOT SPAM

SPAM

Train a Machine Trained Machine


Learning Model Learning Model

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Example of Machine Learning: Score Prediction

Experience/Data Task Performance


Labelled Data: Lectures Predict Error in Prediction
attended vs. Score Score in Chemistry
Lectures Score In Y
New Value of X
Attended Chemistry
Actual 𝒀
Student 1 3 35 Error in
Trained Prediction
Student 2 7 45 𝒀
ML Model
Student 3 16 75
Student 4 14 60 X
𝒀= Score Predicted 𝑿
Y by Model
Students in Class X Y

Train ML Model
X
Amity Centre for Artificial Intelligence, Amity University, Noida, India
Need for Machine Learning

Structure, Find hidden


analyze, patterns ,
interpret dig beneath
large amount the surface
of data

Detecting genes
linked to the
Forecast, deadly ALS
predict risk disease to building
accurately self-driving cars

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Few Examples of Machine Learning Application in Real World

Voice Assistant Recommendation System Character Recognition

Facial Recognition/Detection Driver Assistance System Drug Discovery

Gaming (eg. AlphaGo) Finance (Stock Prediction) Medical Diagnosis

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Types of Machine Learning
Classification
Task Driven (Categorical Labels) NOT SPAM SPAM
Supervised Predict Future
Learning Values Regression Predict
(Continuous Labels) Score in
Chemistry

Machine
Cluster based on Number of Legs
Unsupervised Data Driven
Clustering
Learning Learning

(No defined Labels)


Environment

Reward Action
Reinforcement Learning from
Learning the mistakes

Agent
Amity Centre for Artificial Intelligence, Amity University, Noida, India
Supervised Learning Unsupervised Learning
• Training Data is Labelled • Training Data is Not Labelled
• Task driven • Data driven
• Classification/Regression • Clustering, Dimensionality Reduction
Cluster by Colour

Predict
Category

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Example of Classification vs. Regression
Parameters Classification Regression

Output type Discrete Continuous


A boundary Best Fit Line
Trying to find
Evaluation Accuracy Sum of squared errors

Will it be cold or Hot What is the temperature


tomorrow? going to be tomorrow?
Examples
42⁰C
(Prediction)
Cold Hot

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Example of Classification vs. Regression

Classification
Pass or Fail?
Student Prediction

Regression
Percentage?
Student’s marks
Students in Class Prediction

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Q : Which ML technique is applicable?
1. Determine whether it will be rainy or sunny
depending on temperature, humidity and
wind observed on previous rainy and sunny
days
2. Predict house price based on information
related to the house, such as Size, build
year, number of bedrooms.
3. Identify a fraudulent transactions using a
dataset containing information about
various credit card transactions, including
the transaction amount, location, and time.

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Q : Which ML technique is applicable?
4. Perform a sentiment analysis based on the data containing customer
review of a product.
5. Find a group of similar vehicles from the dataset consisting of various
information such as horsepower, mileage, and number of cylinders.
6. You have a dataset with historical stock market data, including features
such as price, volume, and economic indicators. Your objective is to predict
whether the stock market will go up or down on the next trading day.
7. In a dataset containing sensor readings from industrial equipment, you
have to detect anomalies or equipment failures based on the data.

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Summary

• Machine learning methods provide a way of building models from


datasets.
• Supervised learning uses labelled data while Unsupervised learning
tries to infer from unlabelled data.
• A computer program is said to learn from experience E with respect
to some task T and performance measure P if its performance at
tasks in T, as measured by P, improves with experience E.
• Machine Learning imparts abilities beyond human capability!

Amity Centre for Artificial Intelligence, Amity University, Noida, India


References
1. Machine Learning: A Probabilistic Perspective" by Kevin Murphy, published by MIT Press, 2012.
2. "Pattern Recognition and Machine Learning" by Christopher M. Bishop, published by Springer, 2006.
3. "Python Machine Learning" by Sebastian Raschka and Vahid Mirjalili, published by Packt Publishing,
2015.
4. "Machine Learning Yearning" by Andrew Ng, published by Goodfellow Publishers, 2018.
5. "Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow" by Aurélien Géron, published
by O'Reilly Media, 2019.
6. "Applied Predictive Modeling" by Max Kuhn and Kjell Johnson, published by Springer, 2013.
7. "Reinforcement Learning: An Introduction" by Richard S. Sutton and Andrew G. Barto, published by
MIT Press in 2018.

Amity Centre for Artificial Intelligence, Amity University, Noida, India


Amity Centre for Artificial Intelligence, Amity University, Noida, India

You might also like