Machine Learning Fundamentals (Updated)
Machine Learning Fundamentals (Updated)
Introduction
Timothy Yim
Senior Specialist
Information and Technology Service
[email protected]
Computer vs Human
And with the help of high computational power and data storage,
hopefully computers can out perform humans in terms of
accuracy, speed and volume.
AI vs Machine Learning vs Deep Learning
Problem:
• Classifying three types of Iris, Setosa, Versicolour and Virginica.
Data Cleaning
Data Integration
Data Transformation
Data Transformation
The model is said to learn from existing data and giving outputs
with new data.
Senerio
The data set is divided into k groups, e.g. 10 groups
9 groups of data is used to train the machine learning model and
the remaining group is used for testing.
Iterate each group to become the testing data set.
K-Fold Cross-Validation
Applied Machine Learning in Business
Thanks!
Machine Learning Fundamentals (Session 2)
Objectives
And now, we are going to learn how to build a self learn program
How Human Learns
• Classification – When the output variable is a category, e.g. true or false, red or
blue
• Regression – When the output variable is a real value, e.g. exchange rate,
weight
Supervised Learning – K Nearest Neighbors
• K nearest neighbours is a simple algorithm that stores all available cases and
classifies new cases based on a similarity measure (e.g. distance function).
• When K is infinite, the prediction will become only one class depending on the
total majority, which is useless….
Error Rates
We calculate the error rate to evaluate the effectiveness of our trained model
Bayes Error
• The lowest possible error
rate for any classifier of a
random outcome and is
analogous to the
irreducible error.
Error Rates
In the KNN example, we fine tune the value k to lower the error as much as possible.
But what if we cannot improve the successful rate anymore and it’s still bad….
Supervised Learning – Neural Network
Supervised Learning – Neural Network History
• Warren McCulloch and Walter Pitts (1943) opened the subject by creating a
computational model for neural network.
• First functional networks with many layers were published by Ivakhnenko and
Lapa in 1965.
• In 1970, a lot of research were carried out but stagnated because of computers at
that time lacked sufficient power to process useful neural networks.
• Recently, the rise of high performance GPUs and CPUs make multiple layers
neural network feasible and neural network becomes popular.
Supervised Learning – Neural Network
Neural networks are computing systems vaguely inspired by the biological neural
networks that constitute animal brains
Components
• Neurons
• Input layer
• Hidden layer
• Output layer
Problem:
• Classifying three types of Iris, Setosa, Versicolour and Virginica.
• Clustering is a common
Clustering
Examples:
• K-means clustering
• Hierarchical clustering
• Fuzzy c-means clustering
K-means Clustering
• A centroid is the imaginary or real location representing the center of the cluster
• A centroid is the imaginary or real location representing the center of the cluster
Supervised Learning
• Labelled data
• Develop the finely tuned function to predict with inputs
• Can be very precise and data are harder to be collected
Unsupervised learning
• Unlabelled data
• Find hidden pattern
• Less trustworthy but data are easier to be collected