14-004-1 Machine Learning
14-004-1 Machine Learning
Machine Learning
Introduction
WELCOME TO THE MACHINE LEARNING TASK!
This task introduces you to the most important concepts in Machine Learning,
giving you a general overview of the landscape and preparing you to learn about
the intention and theory behind specific supervised and unsupervised learning
algorithms.
For decades, visions of machines that can learn the way humans can have captured the
imagination of science-fiction authors and researchers alike. But only in recent years have
machine learning programs been developed that can be applied on a wide scale,
influencing our daily lives.
Machine learning programs are working behind the scenes to produce and curate our
playlists, news feeds, weather reports, and email inboxes. They help us find restaurants,
translate documents, and even meet potential dates. From a business perspective,
machine learning-based software is becoming central to many industries, generating
demand for experts.
In 1959, Arthur Samuel, a pioneer in artificial intelligence and gaming, defined machine
learning as the "field of study that gives computers the ability to learn without being
explicitly programmed." He is known for developing a program capable of playing checkers.
Samuel never programmed exactly which strategies the systems could use. Instead, he
devised a way in which the program could learn such strategies through the experience of
playing thousands of games.
In the 50s, machines were hard to acquire and not very powerful, so machine learning
algorithms were mostly an object of theoretical research. Now that computers are vastly
more powerful and more affordable, machine learning has become a very active field of
study with a variety of real-world applications.
DEFINING MACHINE LEARNING
The term “machine learning” is often used interchangeably with the term “artificial
intelligence” (AI). While the two are very much related, they are not the same thing.
There is much debate about the difference between the two, but a simple way to
look at it for our purposes is to see Machine Learning as a type of artificial
intelligence. Any program that completes a task in a way that can be considered
human-like can be considered an example of artificial intelligence, but only
programs that solve the task by learning without pre-programming are machine
learning programs.
Did you know that a London-based company called Google DeepMind has developed an
artificial intelligence-based gamer, which can play 49 video games from Atari 2600 and
achieves better than a professional human player’s top score in 23 of them? Yes, you read
that right!
According to an article (link provided below), “The software isn’t told the rules of the game.
Instead, it uses an algorithm called a deep neural network to examine the state of the
game and figure out which actions produce the highest total score.”
One of the most impressive, and probably the eeriest example, is that in the boxing game,
the software learned how to pin its opponent on the ropes (which is something only
seasoned players of the game knew how to do), and release a barrage of punches until its
opponent was knocked out! Extremely ruthless, right? Give it a read here.
INPUT AND OUTPUT
Since machine learning is a young field that overlaps with several other disciplines,
including statistics, the input and output may be referred to by several other
names.
SUPERVISED LEARNING
Continuing our exploration, we will delve into two common types of supervised
learning: regression and classification, which offer valuable tools for predicting
continuous values and categorising data into distinct classes.
Regression
Commonly used metrics to assess the accuracy of a regression model, which allow
for comparing different models or evaluating the performance of a single model,
are:
● R-squared (R2),
● mean squared error (MSE),
● root mean squared error (RMSE),
● mean absolute error (MAE),
● and mean absolute percentage error (MAPE).
MSE measures the average squared difference between predicted and actual
values, providing an overall measure of prediction accuracy.
RMSE is the square root of MSE and represents the average magnitude of
prediction errors.
Another metric that provides a measure of the average magnitude of errors is
MAE, which calculates the average absolute difference between predicted and
actual values.
Finally, MAPE measures the average percentage difference between predicted and
actual values, which is particularly useful when the magnitude of errors needs to
be assessed relative to the actual values. By default, lower values of MSE, RMSE,
MAE, and MAPE indicate better model performance.
Classification
Finally, we offer a list of common supervised learning algorithms and their typical
usage:
Supervised learning Typical usage
algorithms
Regression Classification
Linear regression ✔
Logistic regression ✔
Decision tree ✔ ✔
Random forest ✔ ✔
Naïve Bayes ✔
K-nearest-neighbour (KNN) ✔ ✔
UNSUPERVISED LEARNING
In unsupervised learning, a program does not learn from labelled data. Instead, it
attempts to discover patterns in the data on its own.
For example, suppose you have two classes scattered in a 2-dimensional space (as
in the first of the images below) and you want to separate the two data sets (as in
the second image on the right-hand side). Unsupervised learning finds underlying
patterns in the data, allowing the classes to be separated.
● K-means clustering
● Hierarchical clustering
● t-Distributed Stochastic Neighbour Embedding (t-SNE)
● Gaussian Mixture Models (GMM)
● Autoencoders
SEMI-SUPERVISED LEARNING
By leveraging the combined dataset, the algorithm learns from the labelled
examples and applies that knowledge to predict outcomes for the unlabelled data,
revealing additional patterns and enhancing the model's understanding of the
problem's underlying structure. This approach is particularly advantageous when
acquiring labelled data is expensive or time-consuming, allowing for optimal
resource utilisation and the potential for improved results compared to using just
one data type.
Compulsory Task 1
1. For each of the following examples describe at least one possible input and
output. Justify your answers:
1.1. A self-driving car
1.2. Netflix recommendation system
1.3. Signature recognition
1.4. Medical diagnosis
Think that the content of this task, or this course as a whole, can be improved, or think
we’ve done a good job?