AIML Lect1 Introduction
AIML Lect1 Introduction
Labs
For project you will
get access of DGX,
request basis.
Artificial Intelligence
not a new term …
Obvious Questions
10
Defining the Learning Task
Improve on task T, with respect to performance metric P, based on
experience E
T: Playing checkers
P: Percentage of games won against an arbitrary opponent
E: Playing practice games against itself
T: Recognizing hand-written words
P: Percentage of words correctly classified
E: Database of human-labeled images of handwritten words
T: Driving on four-lane highways using vision sensors
P: Average distance traveled before a human-judged error
E: A sequence of images and steering commands recorded while
observing a human driver.
T: Categorize email messages as spam or legitimate.
10
P: Percentage of email messages correctly classified.
E: Database of emails, some with human-given labels
Traditional Programming
Data
Output
Program(Features)
Machine Learning
Data
Program(Features)
Output
4
A classic example of a task that requires machine learning:
It is very hard to say what makes a 2
6
• Statistics quantifies numbers
• Data Mining explains patterns
• Machine Learning predicts with models
• Artificial Intelligence behaves and reasons
14
1956
Birth of AI, early successes
Checkers (1952): Samuel’s program learned
weights and played at strong amateur level
10
Overwhelming optimism...
Machines will be capable, within twenty years, of doing any
work a man can do. (Herbert Simon)
12
...underwhelming results
Example: machine translation
(Russian)
14
Implications of early era
Problems:
• Limited computation: search space grew exponentially, outpac-
ing hardware (100! ≈ 10157 > 1080)
• Limited information: complexity of AI problems (number
of words, objects, concepts in the world)
Contributions:
• Lisp, garbage collection, time-sharing (John McCarthy)
• Key paradigm: separate modeling and inference
16
Knowledge-based systems (70-80s)
18
Knowledge-based systems (70-80s)
20
Knowledge-based systems
Contributions:
• First real application that impacted industry
• Knowledge helped curb the exponential growth
Problems:
• Knowledge is not deterministic rules, need to model
uncertainty
• Requires considerable manual effort to create rules, hard to
maintain
27
Deep learning
AlexNet (2012): huge gains in object recognition; trans-
formed computer vision community overnight
29
A melting pot
• Bayes rule (Bayes, 1763) from probability
• Least squares regression (Gauss, 1795) from astronomy
• First-order logic (Frege, 1893) from logic
• Maximum likelihood (Fisher, 1922) from statistics
• Artificial neural networks (McCulloch/Pitts,
1943) from neuro-science
• Minimax games (von Neumann, 1944) fromeconomics
• Stochastic gradient descent (Robbins/Monro,1951) from opti-
mization
• Uniform cost search (Dijkstra, 1956) from algorithms
• Value iteration (Bellman, 1957) from control theory
33
Two broad views of AI
41
Paradigm
Modeling
Inference Learning
59
Paradigm: Modeling
Real world
7 2
7 2 3 6
4
8
6
61
Paradigm: inference
Inference: is to answer questions with respect to the model.
Focus of inference is usually on efficient algorithms that can answer
these questions.
6 7
4
5
5 5 3 1
8 6 3
Model 8
0
8 1 1
7 2
7 2 3 6
4
8
6
Inference
6 7
4
5
5 5 3 1
8 3
6
Predictions 8
0
8 1 1
7 2
7 2 3 6
4
8
6
Paradigm: learning
? ?
?
?
? ? ? ?
? ? ?
Model without parameters ?
?
? ? ?
? ?
? ? ? ?
?
?
?
+data
we have the right type of data, we can run a
machine learning algorithm to tune the
Learningparameters of the model
6 7
4
5
5 5 3 1
8 6 3
Model with parameters 8
0
8 1 1
7 2
7 2 3 6
4
8
6
65
Machine learning
Data Model
69
Type of Data
• Relational Data (Tables/Transaction/etc)
• Text Data (Web)
• Semi-structured Data (XML, JSON)
• Graph Data
– Social Network, Semantic Web, …
• Streaming Data
– Network traffic, sensor data,…
• etc
36
Types of Learning
• Supervised Learning,
– Classification,
– Regression, etc.
• Unsupervised Learning,
• Semi-Supervised Learning,
• Etc.
37
Types of Learning
Reinforcement Learning
Supervised
Learning
Unsupervised
Learning
23
From Gartner, Recht
Supervised Learning: Uses
• Prediction of future cases: Use the rule to
predict the output of future inputs
• Knowledge extraction: The rule is easy to
understand
• Outlier detection: Exceptions not covered by
the rule, e.g., fraud
39
Classification
• Example: Credit
scoring
• Differentiating
between low-risk
and high-risk
customers from
their income and
savings
41
Regression
• Example: Price of a
used car
• x : car attributes
y = wx+w0
y : price
y = g (x | q )
g ( ) model,
q parameters
42
Unsupervised Learning
• Clustering: Grouping similar instances
• Some applications
– Customer segmentation
– Image compression
43
Unsupervised Learning
29
Semi-Supervised Learning
• This learning technique uses labeled as well as un-
labeled data.
• Label data is in small quantity while un-labeled data is
in large amount.
• First un-supervised algorithm forms groups (clusters)
of un-labeled data and then existing labeled data is
used to label the clustered un-labeled data.
• Elements closer (similar) to each other are more likely
to have the same output label.
46
Student example
• Supervised learning: faculty supervision all the
times (data?)
• Unsupervised learning: student has to figure out a
concept himself (data?)
• Semi-Supervised learning:
– SL: faculty teaches some concepts in class
– SSL: student solves homework questions based
on similar concepts taught by faculty in class.
47
Common tasks
• Description
• Estimation
• Prediction
• Classification
• Clustering
• Association
48
Description
• Find ways to describe patterns and trends lying
within data.
• For example, a pollster (a person who conducts
or analyses opinion polls) may uncover
evidence that those who have been laid off are
less likely to support the present prime minster
in the election.
• Decision trees provide an intuitive and human
friendly explanation of their results
49
Estimation
• Estimation is similar to classification except that the target
variable is numerical rather than categorical (divided into
groups).
• For example, we might be interested in estimating the
systolic blood pressure reading of a hospital patient, based
on the patient’s age, gender, body-mass index, and blood
sodium levels.
• Estimation model can be used to new cases.
• Linear Regression, Neural networks
50
Estimation Examples
• Estimating the amount of money a randomly chosen family
of four will spend for back-to-school shopping this winter.
• Estimating the CGPA of a graduate student, based on that
student’s undergraduate CGPA.
51
Prediction
• Prediction is similar to classification and estimation, except
that for prediction, the results lie in the future.
– Predicting the price of a stock three months into the
future
– Predicting the percentage increase in traffic deaths next
year if the speed limit is increased
– Predicting whether a particular molecule in COVID-2019
drug discovery will lead to a profitable new drug for a
pharmaceutical company
52
Classification
• In classification, there is a target categorical variable, such
as income bracket that can partitioned into different
classes or categories:
– High income,
– Middle income, and
– Low income.
53
Clustering
• Clustering refers to the grouping of records,
observations, or cases into groups of similar objects
54
Association
• The association task is the job of finding which attributes
“go together”
• Finding out which items in a supermarket are purchased
together and which items are never purchased together
• Apriori algorithm
55
Identify the relevant task
• The present India PM party would like to approximate
how many seats their next opponent party will get in
coming election.
– Estimation: estimating the number of seats (numeric
target).
56
Identify the relevant task Cont’d
• A political strategist is seeking the groups for donations
for his party in coming elections.
– Clustering: examine the profile of each homogeneous
group derived from a particular state’s population;
– Association: discover interesting rules pertaining to a
large proportion of the population
57
Identify the relevant task Cont’d
• Investigating the proportion of subscribers to a
company’s cell phone plan that respond positively to
an offer of a service upgrade.
• Predicting degradation in telecommunications
networks
• Examining the proportion of children whose parents
read to them who are themselves good readers
• Determining the proportion of cases in which a new
drug will exhibit dangerous side effects
58
The Agent-Environment Interface
30
Reflex
“Low-level AI and Machine learning “High-level
intelligence” intelligence”
Reflex-based models
• A reflex-based model simply performs a fixed
sequence of computations on a given input.
• Common models in machine learning
• Examples: linear classifiers, deep neural networks
• Fully feed-forward (no backtracking)
73
Search problems
Markov decision processes
Adversarial games
Reflex States
79
State-based models
White to move
State-based models
To model the state and transitions between states that are
triggered by actions. G(V, E)
States ➔ Nodes
Transitions ➔Edges.
In state-based models, solutions are procedural.
Applications:
• Games:Chess, Go, Pac-Man, Starcraft, etc.
• Robotics: Motion planning
• Natural language generation: Machine translation, image
captioning
Search problems
Markov decision processes Constraint satisfaction
problems
Adversarial games Bayesian networks
Goal: put digits in blank squares so each row, column, and 3x3 sub-block
has digits 1–9
min Cost(p)
p∈Paths
min TrainingError(w)
w∈Rd