Lect01 Intro ML
Lect01 Intro ML
2023
Contents
1. Machine Learning
2. Learning Agent
3. Data
4. Exploration
5. Type of Learnings
Learning Agent
Data
Concept 1 (Mitchell (1997))
Exploration Learning ≡ Improving with experience at some task
Type of
Learnings
• Improve over task T ,
Successes of • with respect to performance measure P,
Machine
Learning • based on experience E .
Vision
Language
Games
Robotics
Other
4
Inductive Learning
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Type of
Learnings General rules Specific examples
Successes of
Machine ...
Learning
Vision
Language
Games
Robotics
Other
Inductive learning
5
Machine Learning vs. Traditional Programming
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Computer/Agent Traditional programming
Exploration
Type of
Learnings
Successes of Program
Machine
Learning
Vision
Language
Learning
Games Machine learning
Robotics Algorithm
Other
6
Machine Learning vs. Agents
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
7
Machine Learning vs. Artificial Intelligence
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data ARTIFICIAL
Exploration INTELLIGENCE
Early artificial intelligence
Type of stirs excitement.
MACHINE
Learnings LEARNING
Machine learning begin
Successes of to flourish.
Machine DEEP
Learning LEARNING
Vision Deep learning breakthoughs
Language
drive AI boom.
Games
Robotics
Other
8
Interpretable Machine Learning - Explainable Artificial
Machine
Learning
Intelligence
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
9
The Explainable Artificial Intelligence (cont.)
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Task
Data
Exploration
Type of Decision or
Why did you do that?
Why not something else?
Learnings Machine Learning Recommendation When do you succeed?
AI When do you fail?
Process
Successes of When can I trust you?
Machine How do I correct an error?
Learning Training data Learned model
Vision
Language User
Games
Robotics Task
Other
I understand why
I understand why not
Explainable AI Machine Learning Explanation I know when you succeed
Process Interface I know when you fail
I know when to trust you
I know why you erred
Explainable
Training data
model
User
10
Human vs. Model
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
The challenge is people don’t understand the system and the system doesn’t
understand the people.
Data
Exploration
Type of
• We need models for the system to use to understand and explain things to
Learnings
the human.
Successes of
Machine • We also need models in the human’s head about what the system does.
Learning
Vision
Language
Games
Robotics
Other
11
Learning Agent
Agents Need Learning
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Exploration
• Learning is essential for unknown
Type of
Learnings environments, i.e., when designer lacks
Successes of omniscience
Machine
Learning • Learning is useful as a system construction
Vision
Language method, i.e., expose the agent to reality
rather than trying to write it down
Games
Robotics
Other
13
Forms of Learning
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Any component of an agent can be improved by learning from data. The
improvements, and the techniques used to make them, depend on four major
Data
Exploration
factors:
Type of
Learnings • Which component is to be improved.
Successes of • What prior knowledge the agent already has.
Machine
Learning • What representation is used for the data and the component.
• What feedback is available to learn from.
Vision
Language
Games
Performance standard
Robotics
Other
Critic Sensors
feedback
Environment
changes
Learning Performance
element element
knowledge
learning
goals
experiments
Problem
generator
Agent Effectors
14
Components to be learned
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
The components of these agents include:
Data
Exploration
1. A direct mapping from conditions on the current state to actions.
Type of 2. A means to infer relevant properties of the world from the percept sequence.
Learnings
Successes of 3. Information about the way the world evolves and about the results of possible
Machine
Learning
actions the agent can take.
Vision
Language 4. Utility information indicating the desirability of world states.
5. Action-value information indicating the desirability of actions.
Games
Robotics
Other
15
Representation and prior knowledge
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Representations can be
Data
Exploration
• Functions with inputs, a vector of attribute values, and outputs, either a
Type of continuous numerical value or a discrete value
Learnings
• Functions and prior knowledge composed of first-order logic sentences
Successes of
Machine • Bayesian networks
Learning
Vision
Language
Games
Robotics
Other
16
Feedback to learn from
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
There are three types of feedback that determine the three main types of learning:
Data
Exploration
• In unsupervised learning the agent learns patterns in the input even though
Type of no explicit feedback is supplied.
Learnings
• In reinforcement learning the agent learns from a series of
Successes of
Machine reinforcements—rewards or punishments.
Learning
Vision • In supervised learning the agent observes some example input–output pairs
Language
Games and learns a function that maps from input to output.
Robotics
Other • In semi-supervised learning we are given a few labeled examples and
must make what we can of a large collection of unlabeled examples.
17
Machine Learning Workflow
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Type of
Learnings
Successes of
Machine
Learning Select 1. Collect
Vision
4. Evaluate Report
problem data
Language
Games
Robotics
Other
6. Monitor 5. Deploy
18
Machine Learning Workflow (cont.)
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
1. Collect available data.
Data
Exploration
2. Clean and transform that data. If you’re collecting data that is missing
Type of values, then you need to clean and transform that data until it’s in the form
Learnings
machine learning requires.
Successes of
Machine 3. Explore and visualize the data to make sure it is encoding what you expect it
Learning
Vision to encode. Build a model on training data.
Language
Games 4. Evaluate the model test data.
Robotics
Other
5. Deploy the model on un-seen data.
6. Monitor the model
19
Data
Types of Data
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Record
Data
Exploration
• Relational records
Type of • Data matrix: numerical matrix
Learnings
• Document data: text documents
Successes of
Machine • Transaction data
Learning
Vision • Graph and network
Language
Games • World Wide Web
Robotics
Other • Social or information networks
• Molecular Structures
21
Types of Data (cont.)
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Ordered
Data
• Video data: sequence of images
Exploration
Type of
• Temporal data: time-series
Learnings • Sequential Data: transaction sequences
Successes of
Machine
• Genetic sequence data
Learning
Vision
• Spatial, image and multimedia
Language
Games
• Spatial data: maps
Robotics
Other
• Image data
• Video data
22
Data Sets
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data Concept 2
Exploration • Data sets are made up of data objects.
Type of
Learnings
• A data object represents an entity (also called samples, examples,
Successes of instances, data points, objects, tuples).
Machine
Learning • Data objects are described by attributes.
Vision
Language
Games
Robotics
Other
23
Attributes
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data Concept 3
Exploration An attribute (also called dimension, feature, variable) is a data field, representing
Type of
Learnings
a characteristic or feature of a data object.
Successes of
Machine
Learning
Data set Attributes
Vision Sales database customers, store items, sales
Medical database patients, treatments
Language
Games
24
Attribute Types
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Nominal: categories, states, or “names of things”
Data
Exploration
• hair color = {auburn, black, blond, brown, grey, red, white}
Type of • marital status, occupation, ID numbers, zip codes
Learnings
Successes of
• Binary: nominal attribute with only two states
Machine
Learning
• gender (symmetric: both outcomes equally important)
Vision
Language
• medical test (positive vs. negative) (asymmetric: outcomes not equally
Games
Robotics
important)
Other
• Ordinal: values have a meaningful order but magnitude between successive
values is not known.
• size = {small, medium, large}
• grades, rankings
25
Numeric Attribute Types
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Quantity (integer or real-valued)
Data
Successes of
• temperature in Celsius or Fahrenheit
Machine • calendar dates
Learning
Vision
Language
• Ratio scale: Inherent zero-point
Games
Robotics
• temperature in Kelvin
Other
• length
• counts
• monetary quantities
26
Discrete vs. Continuous Attributes
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Discrete Attribute: Has only a finite or countably infinite set of values
Data
Exploration
• zip codes
Type of • profession
Learnings
Successes of
Note: Sometimes, represented as integer variables; binary attributes are a
Machine
Learning
special case of discrete attributes
Vision
Language
• Continuous Attribute: Has real numbers as attribute values
Games
Robotics
• temperature
Other
• height, or weight
27
Sample datasets
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Housing data for 506 census tracts of Boston from the 1970 census
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games • Iris data set gives the measurements in centimeters of the variables sepal
length and width and petal length and width, respectively, for 50 flowers from
Robotics
Other
28
Sample datasets (cont.)
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• BBC news dataset
Data
29
Tensor-based Attributes
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data Concept 4
Exploration A tensor is a generalized matrix, a finite table of numerical values indexed along
Type of
Learnings
several discrete dimensions.
Successes of • A 0d tensor is a scalar
Machine
Learning • A 1d tensor is a vector (e.g. a sound sample)
Vision
Language • A 2d tensor is a matrix (e.g. a grayscale image)
Games
Robotics
Other
• A 3d tensor (e.g. a multi-channel image)
• A 4d tensor (e.g. a sequence of multi-channel images)
30
Tensor-based Attributes (cont.)
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
tensor-0d tensor-1d tensor-2d tensor-3d
Other
tensor-4d
31
Sample dataset
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• 28 × 28 grayscale images, 60k train samples, 10k test samples.
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
32
Exploration
Data Visualization
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data Concept 5
Exploration Visualization is the conversion of data into a visual or tabular format so that
Type of
Learnings
the characteristics of the data and the relationships among data items or
Successes of
attributes can be analyzed or reported.
Machine
Learning
Vision
Humans have a well developed ability to analyze large amounts of information
Language
Games
that is presented visually
Robotics
Other
• Can detect general patterns and trends
• Can detect outliers and unusual patterns
34
Data Visualization (cont.)
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
35
Type of Learnings
Basic Premise of Learning
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Successes of
Machine
• Supervised learning
Learning
Vision
• Unsupervised learning
Language
Games • Reinforcement learning
Robotics
Other
37
Supervised Learning
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• We get data D: (input, correct ouput)
Data
Exploration
• When the output is one of a finite set of values, the learning problem is
Type of called classification
Learnings
• When the output is a number, the learning problem is called regression
Successes of
Machine • Example from vending machine - coin classification
Learning
Vision
Language
Games
Robotics
25
Mass
Other
5
1
10
Size
38
Unsupervised Learning
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Instead of (input, correct output), we get (input, ?)
Data
Exploration
Type of
Learnings
Mass
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
Size
39
Reinforcement Learning
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• We get data D: (observation, action, and reward)
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
40
Successes of Machine Learning
• Vision
• Language
• Games
• Robotics
• Other
Detection and Segmentation
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
43
Image generation
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Faces: 1024x1024 resolution, CelebA-HQ dataset
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
45
Translation
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data • “The reason Boeing are doing this is to cram more seats in to make their
Exploration plane more competitive with our products,” said Kevin Keniston, head of
Type of
Learnings
passenger comfort at Europe’s Airbus.
Successes of
Machine ↓
Learning
Vision
• Kevin Keniston, người đứng đầu bộ phận thoải mái của hành khách tại
Language
Games
Europe’s Airbus, cho biết: “Lý do Boeing làm điều này là để nhồi nhét thêm
Robotics
Other
ghế để máy bay của họ cạnh tranh hơn với các sản phẩm của chúng tôi.”
46
Text Generation
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Language model: GPT3
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
47
ChatBot
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
48
Speech Applications
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Siri
Data
Exploration • Alexa
Type of
Learnings
• Google Assitance
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
49
Sketch2Code
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• Sketch2Code is a web-based solution which uses AI to transform a
Data
handwritten user interface design from a picture to a valid HTML markup
Exploration
Type of
code
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
50
Auto-captioning
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
51
Text-to-Image
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
OpenAI’s DALL-E
Data
Exploration
• TEXT PROMPT:
Type of an illustration of a baby daikon radish in a tutu walking a dog
Learnings
52
Text-to-Image (cont.)
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
53
Games
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• 2013: DeepMind uses deep reinforcement learning to beat humans at some
Data
Atari games
Exploration
• 2016: DeepMind’s AlphaGo system beats Go grandmaster Lee Sedol 4-1
Type of
Learnings • 2017: AlphaZero learns to play Go and chess from scratch
Successes of
Machine
• 2019: DeepMind’s AlphaStar (StarCraft 2) AI is better than 99.8 percent of
Learning
Vision
all human players
Language
Games
Robotics
Other
54
Self-driving cars
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
Data
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
55
Solving scientific problems
Machine
Learning
Machine Learning
Interpretable Machine
Learning
Learning Agent
• AlphaFold 2 (2020): Using AI for scientific discovery; a solution to a
Data
50-year-old grand challenge in biology.
Exploration
Type of
Learnings
Successes of
Machine
Learning
Vision
Language
Games
Robotics
Other
56
References