Professional Documents
Culture Documents
Dr. A. OBULESU
Assoc. Professor
1
Learn by Doing…
2
A little about me
1982 – 2020 . . .
3
Agenda
④ Clarifications on Models
4
programmed"
Ma
Machine learning is about predicting the future
chinbased on
the past.
-- Hal Daume III e
Lear
past future
ning ic t
rn e d
lea r
Training model/ Testing
is…
model/
p
Instance based
How They Generalize? Modl based
Model Based
Thursday, September 30, 202 leadingindia.ai A nationwide AI Skilling and 9
1
Few Popular Applications: Precision Agriculture, Learner Profiling, Video Captioning, Exploring Patterns from Satellite
images, Image detection in Healthcare, Identifying specific markers in Genomes, Creating Art and Music,
Recommendations, behavior prediction,
Thursday, September 30, 202 leadingindia.ai A nationwide AI Skilling and 10
1
Three main areas where Deep learning is being prominently applied
Thursday, September 30, 202 leadingindia.ai A nationwide AI Skilling and 12
1
1. Problems where a) There is no deterministic algorithm (not even of evil complexity) e.g.
Recognizing a 3D object from a given scene, Handwriting recognition, Speech recognition
2. Problems which don’t have a fix solution and goal posts keep changing. System adapts
and learns from experience e.g. SPAM emails, Financial fraud, IT Security Framework
3. Where Solutions are Individual specific or time dependent. e.g. recommendations and
targeted advertisements
4. For prediction based on past and existing patterns (not defined or defined by huge
number of weak rules) e.g. prediction of share prices etc.
Supervised learning
label
• Feed The Label Dataset to The Model…
apple
apple
banana
In My Words: Supervised Learning is
banana Learning By Us …With Teacher…
Ma
chin
rn e i ct
lea pr
e d
Lear
model/
predictor
ning
is…
Supervised
Learning
11
Test Data
12
Unsupervised learning
In My Words: Un-Supervised
Learning is Learning With Out
Teacher…
Reinforcement learning
•Given a sequence of examples/states and a reward after
completing that sequence, learn to predict the action to take in
for an individual example/state
… WIN! In My Words:
Feedback System
… LOSE!
…
14
Lets us understand with use cases?
P
UL B
I
S H
Collect the data automatically Self driving car on the road Accurate results in Google search
2. notebook
3. kaggle note book
4.Google colab note book
5.Microsoft jupyter note book
17
2. Collecting Data
This is the first real step towards the real development of a machine learning
model
The more and better data that we get , The better model we will design
There are many sources calling Web scraping like
Kaggle
UCI Machine Learning Repository: Created as an ftp archive in 1987 by
David Aha and fellow graduate students at UC Irvine
20
2. Case study :
Taken files from Kaggle
features.csv
target.csv
21
2. Case study :
Taken files from Kaggle
features.csv : Features Names
target.csv : Features Name
22
•
25
Learning model
data that has learned patterns that are too specific to training data and
•Getting more data is usually the best solution, a model trained on more data
Regularization
•L1 regularization: The cost is proportional to the absolute the value of the
•L2 regularization: The cost is proportional to the square of the value of the
31
•
To develop a benchamark model that serves us as a baseline
① Logistic Regression
② KNN Classifiers
④ SVM
34
1. Regression
• Predict future scores on Y based on measured scores on X
Predictions are based on a correlation from a sample where both
X and Y were measured.
Equation is linear:
y = bx + a
y = predicted score on y
x = measured score on x
b = slope
a = y-intercept
35
Y i 0 1X i i
Dependent Independent (Explanatory) Variable
(Response) Variable
(e.g., COVID-19.) (e.g., age)
things to know
- You need data labeled with the correct
answers to "train" these algorithms before
they work
- feature = dimension = attribute of the data
- class = category = Harry Po!er house
linear discriminants
draw a line through it
Linear discriminants
draw a line through it
Linear discriminants
!
6 wrong
4 wrong
a map of shittiness
to find the least shitty line
shittine
ss
slo
pe t
rcep
inte
linear discriminants:
probably donot use these
logistic regression
divide it with a log function
Divide it with a log function
logistic regression
!!!!!!!!!!!
+ gives you probabilities
+ the model is a formula
+ can ÒthresholdÓ to make model more or les
conservative
- only works with linear decision boundaries
36
Logistic regression
That the probability can not be negative, so we introduce a term called
Since the probability can never be greater than 1, we need to divide our
KNN Classifier
• Data set:
• Training (labeled) data: T = {(x i , yi)}
• x i ∈ Rp
• Test (unlabeled) data: x0 ∈ Rp
• Tasks:
• Classification: yi ∈ {1, . . . , J}
• Given new x0 predict y0
• Methods:
• Model-based
• Memory-based
41
Classification
KNN Classifier
• 1 NN
• Predict the same value/class as the nearest instance in
the training set
• k NN
• Find the k closest training points (small ǁxi − x0ǁ
according to some metric, for ex. euclidean,
manhattan, etc.)
45
k NN - Example
!!!!!!!!!!!
+ no training, adding new data is easy
+ you get to deÞne ÒdistanceÓ!
"""""""""""
- can be outlier-sensitive
- you haveto deÞne ÒdistanceÓ
46
k NN Classification
• Choice of k
Geometric Margin
Definition: The margin of example 𝑥 w.r.t. a linear sep. 𝑤 is the distance
from 𝑥 to the plane 𝑤 ⋅ 𝑥 = 0.
Thank you !
obuleshcse@cvsr.ac.in
7
AI can Achieve
Robotics
Machine
Learning
DL
12
Classification
Classification : Predicting of Discrete Value .i.e. Apple or Banana or 0 or 1
Applications
• Face recognition
• Character recognition ,
• Spam detection,
• Medical diagnosis: From symptoms to illnesses,
• Biometrics: Recognition/authentication using physical and/or behavioral
characteristics: Face, iris, signature, etc..
14
3.2
4.3
Regression Applications
• Economics/Finance: predict the value of a stock
• Epidemiology
Unsupervised learning
• Learn clusters/groups without any label
•Image compression