You are on page 1of 32

Applications of

Artificial Intelligence
(ME3181)

Fundamentals

Phung Thanh Huy


Department of Mechatronics
Ho Chi Minh City University of Technology (HCMUT)
huypt@hcmut.edu.vn
05/09/2023
Modelling from data
Well-posed Learning problem
A computer program is said to learn from experience E with respect to some
task T and some performance measure P, if its performance on T, as measured
by P, improves with experience E.
—Tom Mitchell, 1997

Lecture notes of Andrew Ng


Applications of AI (ME3181) 2
Modelling from data
Handwriting Recognition
Task T
–recognizing and classifying handwritten
words within images

Performance measure P
–percent of words correctly classified

Training experience E
–a database of handwritten words with
given classifications

Lecture notes of Andrew Ng


Applications of AI (ME3181) 3
Modelling from data
Traditional Programming
Input
Computer Output
Rule
Machine Learning
• Training Phase / Learning Phase/ Modelling Modelling Process

Known Input
Computer Rule
Known Output
Model
Data
- Set of available data pieces = dataset
- Each data piece (point) is a sample or an example
- Data could be only input (unsupvised learning)
• Prediction Phase
New Input
Computer Predicted Output
Model

Applications of AI (ME3181) 4
Modelling from data
o Each feature can be represented in a variable 𝑥𝑖
o All the features can be represented in a vector of features:
𝑥1
𝑥2
𝑥 = … = 𝑥1 , 𝑥2 , … , 𝑥𝑛 𝑇
𝑥𝑛
o A label can be represented in the same ways.
o There are some special ways to represent labels and features for some
special problems

Applications of AI (ME3181) 5
Modelling from data
• Inputs: Features, Variables, Attributes, Covariates
• Outputs: Response variables, Labels, Tagets

https://www.amybergquist.com/

Applications of AI (ME3181) 6
Modelling from data
• Inputs: Features, Variables, Attributes, Covariates
• Outputs: Response variables, Labels, Tagets

Applications of AI (ME3181) 7
Modelling from data
• Inputs: Features, Variables, Attributes, Covariates
• Outputs: Response variables, Labels, Tagets

Applications of AI (ME3181) 8
Modelling from data
• Inputs: Features, Variables, Attributes, Covariates
• Outputs: Response variables, Labels, Tagets

Applications of AI (ME3181) 9
Modelling from data
• Inputs: Features, Variables, Attributes, Covariates
• Outputs: Response variables, Labels, Tagets

Features

Applications of AI (ME3181) 10
Modelling from data

https://www.linkedin.com/pulse/customer-segmentation-using-python-data-science-deepak-sharma

Applications of AI (ME3181) 11
Modelling from data

Camelia Florea et al., Bul. Inst. Polit. Iaşi, t.


LVII (LXI), f. 6, 2011

Applications of AI (ME3181) 12
Modelling from data
o Supervised Learning
o Dataset is the collections of labeled examples.
o Un-supervised Learning
o Dataset is a collection of un-labeled examples.
o Self-supervised Learning (Semi-Supervised Learning)
o Dataset included both labled and un-labled examples.
o The number of un-labled examples is usually more than that of labled
examples

Applications of AI (ME3181) 13
Modelling from data
o Supervised Learning
o Dataset is the collections of labeled examples.
o Un-supervised Learning
o Dataset is a collection of un-labeled examples.
o Self-supervised Learning (Semi-Supervised Learning)
o Dataset included both labled and un-labled examples.
o The number of un-labled examples is usually more than that of labled
examples

Applications of AI (ME3181) 14
Modelling from data
o Supervised Learning
o Dataset is the collections of labeled examples.
o Un-supervised Learning
o Dataset is a collection of un-labeled examples.
o Self-supervised Learning (Semi-Supervised Learning)
o Dataset included both labled and un-labled examples.
o The number of un-labled examples is usually more than that of labled
examples

Applications of AI (ME3181) 15
Modelling from data
o Supervised Learning
o Dataset is the collections of labeled examples.
o Un-supervised Learning
o Dataset is a collection of un-labeled examples.
o Self-supervised Learning (Semi-Supervised Learning)
o Dataset included both labled and un-labled examples.
o The number of un-labled examples is usually more than that of labled
examples

Applications of AI (ME3181) 16
Modelling from data

https://www.analyticsvidhya.com/
Applications of AI (ME3181) 17
Modelling from data
o Reinforcement Learning
o Learn a policy

Applications of AI (ME3181) 18
Modelling from data
o Batch Learning (Offline Learning)
• Trained using all the available data
• First the system is trained, and then it is launched into production and
runs without learning anymore
• Take a lot of time and computing resources
o Online Learning (Incremental learning)
• Data is feed instances sequentially, either individually or in small
groups called minibatches

Using online learning to handle huge datasets

Applications of AI (ME3181) 19
Modelling from data
o Instance-based Learning
• The system “learns the examples by heart”
• Then generalizes to new cases by using a similarity measure to
compare them to the learned examples (or a subset of them)
o Model-based Learning
• Build a model of the examples and the model to make
predictions

Applications of AI (ME3181) 20
Data Preparation
Test = Val

Train Val Test

Applications of AI (ME3181) 21
Data Preparation
• Popular open data repositories
UC Irvine Machine Learning Repository
Kaggle datasets
Amazon’s AWS datasets
• Meta portals (they list open data repositories)
Data Portals
OpenDataMonitor
Quandl
• Other pages listing many popular open data repositories
Wikipedia’s list of Machine Learning datasets
Quora.com
The datasets subreddit

Applications of AI (ME3181) 22
Mathematical Concepts Review 1
Data structure
• Scalar: a simple numerical value.
• E.g.: 0, 1, 3.5, 2.5,…
• Scalar Variables are usually denoted as italic letters (𝑥, 𝑎, 𝑦, …).
• Vector (programing: array): ordered list of scalar values.
• The scalar values in a vectors are attributes or features.
• Usually denoted as bold letters x or w.
• Usually represented as column vectors.
• Lazy notation (in my lectures) : 𝑥 = 𝑥1 , 𝑥2 , … , 𝑥𝑛
• Can be represented as points or arrows
• Matrix: 2-D vector (lazy thinking)
• Tensor: Higher dimension vectors (lazy thinking)

Applications of AI (ME3181) 23
Mathematical Concepts Review 1
Operations

• Summation

• Production

• Operations on Vector: Self-review (Norm of a vector)

• Operations on Matrix: Self-review

Applications of AI (ME3181) 24
Mathematical Concepts Review 1
Function
Extrema: Minima, maxima

Applications of AI (ME3181) 25
Mathematical Concepts Review 1
Derivative and Gradient

A function 𝑓(𝑥)
𝑑𝑓
Derivative: 𝑓 ′ 𝑥 = 𝑑𝑥
𝜕𝑓
Partial derivatives (multi-variable function): 𝜕𝑥
1
𝜕𝑓 𝜕𝑓
Gradient: ∇𝑓 is a vector [ , ,…]
𝜕𝑥1 𝜕𝑥2
Chain rules:

Applications of AI (ME3181) 26
Mathematical Concepts Review 1
Random Variables and Probability

Source: UST Class-Machine Learning (by Junseong Bang)

Applications of AI (ME3181) 27
Mathematical Concepts Review 1
Random Variables and Probability

Source: UST Class-Machine Learning (by Junseong Bang)

Applications of AI (ME3181) 28
Mathematical Concepts Review 1
Random Variables and Probability

Source: UST Class-Machine Learning (by Junseong Bang)

Applications of AI (ME3181) 29
Mathematical Concepts Review 1
Random Variables and Probability

Source: UST Class-Machine Learning (by Junseong Bang)

Applications of AI (ME3181) 30
Mathematical Concepts Review 1
Random Variables and Probability

Source: UST Class-Machine Learning (by Junseong Bang)

Applications of AI (ME3181) 31
Mathematical Concepts Review 1
Random Variables and Probability

Source: UST Class-Machine Learning (by Junseong Bang)

Applications of AI (ME3181) 32

You might also like