0% found this document useful (0 votes)
12 views28 pages

Machine Learning in Big Data Mining

The document discusses the intersection of machine learning, data science, and big data mining, highlighting the importance of computational intelligence in extracting knowledge from large datasets. Authored by Prof. Dr. Dewan Md. Farid, it outlines various machine learning techniques, data analytics, and the significance of high-quality data in achieving effective outcomes. It also emphasizes the role of machine learning in adapting to changing scenarios and its applications across different domains.

Uploaded by

no4343name
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views28 pages

Machine Learning in Big Data Mining

The document discusses the intersection of machine learning, data science, and big data mining, highlighting the importance of computational intelligence in extracting knowledge from large datasets. Authored by Prof. Dr. Dewan Md. Farid, it outlines various machine learning techniques, data analytics, and the significance of high-quality data in achieving effective outcomes. It also emphasizes the role of machine learning in adapting to changing scenarios and its applications across different domains.

Uploaded by

no4343name
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MACHINE LEARNING, DATA SCIENCE,

BIG DATA MINING


MACHINE LEARNING, DATA SCIENCE,
BIG DATA MINING
Machine Learning for Data Mining
Applications in Big Data

Prof. Dr. Dewan Md. Farid


Department of Computer Science & Engineering
Southeast University

[Link]
ABOUT THE AUTHOR

PROF. DR. DEWAN MD. FARID, is Dean of School of Science & Engineering, and
Professor of Computer Science & Engineering at Southeast University. Before
joining Southeast he worked for over a decade as a Professor of Computer Science
and Engineering at United International University. He is an IEEE Senior Member
and Member ACM.
Prof. Farid worked as a Postdoctoral Fellow/Staff at the following research labs/-
groups: (1) Computational Intelligence Group (CIG), Department of Computer
Science and Digital Technology, University of Northumbria at Newcastle, UK in
2013, (2) Computational Modelling Lab (CoMo) and Artificial Intelligence Re-
search Group, Department of Computer Science, Vrije Universiteit Brussel, Bel-
gium in 2015-2016, and (3) Decision and Information Systems for Production sys-
tems (DISP) Laboratory, IUT Lumière – Université Lyon 2, France in 2020. Prof.
Farid was a Visiting Faculty at the Faculty of Engineering, University of Porto,
Portugal in June 2016. He holds a PhD in Computer Science and Engineering
from Jahangirnagar University in 2012. Part of his PhD research has been done at
ERIC Laboratory, University Lumière Lyon 2, France by Erasmus-Mundus ECW
eLink PhD Exchange Program. His PhD was fully funded by Ministry of Sci-
ence & Information and Communication Technology, Government of the People’s
Republic of Bangladesh and European Union (EU) eLink project.

v
vi ABOUT THE AUTHOR

Prof. Farid has published 152 peer-reviewed scientific articles, including 37 highly
esteemed journals like Expert Systems with Applications, IEEE Access, Journal of
Theoretical Biology, Journal of Neuroscience Methods, Bioinformatics, Scientific
Reports (Nature), Proteins and so on in the field of Machine Learning, Data Min-
ing, Data Science and Big Data. Prof. Farid received the following awards: (1) Dr.
Fatema Rashid Best Paper Award (2nd Position) for the paper titled “KNNTree: A
new method to ameliorate k-nearest neighbour classification using decision tree”
in 3rd International Conference on Electrical Computer and Communication En-
gineering (ECCE 2023), CUET, Chittagong, Bangladesh, (2) Best Paper Award
for the paper titled ”Layered ensemble learning for effective binary classification”
in 2nd International Conference on Emerging Technology in Data Mining and In-
formation Security (IEMIS 2020), Kolkata, India, (3) JuliaCon 2019 Travel Award
for attending Julia Conference at the University of Maryland, Baltimore, USA, and
(4) United Group Research Award 2016 in the field of Science and Engineering.
He received the following research funds as Principal Investigator: (1) a2i Inno-
vation Fund of Innov-A-Thon 2018 (Ideabank ID No.: 12502) from a2i-Access
to Information Program – II, Information and Communication Technology (ICT)
Division, Government of the People’s Republic of Bangladesh, and (2) Project
Code: UIU/IAR/01/2021/SE/23 received from Institute for Advanced Research
(IAR), United International University.
Prof. Farid received the following Erasmus Mundus scholarships: (1) LEADERS
(Leading mobility between Europe and Asia in Developing Engineering Educa-
tion and Research) to undertake a staff level mobility at the Faculty of Engineering,
University of Porto, Portugal in 2015, (2) cLink (Centre of excellence for Learn-
ing, Innovation, Networking and Knowledge) for pursuing Postdoc at University
of Northumbria at Newcastle, UK in 2013, and (3) eLink (east west Link for In-
novation, Networking and Knowledge exchange) for pursuing Ph.D. at University
Lumière Lyon 2, France in 2009. Prof. Farid also received Senior Fellowship I
and II awards by National Science & Information and Communication Technol-
ogy (NSICT), Ministry of Science & Information and Communication Technol-
ogy, Government of the People’s Republic of Bangladesh respectively in 2008 and
2011 for pursuing Ph.D. at Jahangirnagar University. He visited 19 countries for
attending international conferences, research and higher education. Prof. Farid
delivered several invited/keynote talks including an invited research talk at Data
to AI Group (DAI), Laboratory for Information and Decision Systems (LIDS),
Massachusetts Institute of Technology (MIT), Cambridge, Massachusetts, USA.
CONTENTS

List of Symbols ix

PART I LEARNING FROM DATA

1 Introduction 3
1.1 Computational Intelligence 3
1.1.1 Why Machine Learning is Needed? 5
1.2 Data Terminology 6
1.3 Five Types of Data Analytics 8
1.4 Machine Learning Techniques 9
1.4.1 Supervised Learning 9
1.4.2 Unsupervised Learning 10
1.4.3 Other Types of Learning 12
1.5 Machine Learning Lifecycle - CRISP-ML(Q) 13
1.6 Data Preprocessing 15
1.7 Extracting Rules form Data 17
1.8 Exercises 18

vii
SYMBOLS

X Training/historical data (set of instances used to train classifiers)


n Size of X
(x(i) , y (i) ) The i-th instance pair in X (supervised learning)
y (i) The target/class/decision associated with x(i) in X (supervised learning)
x(i) The i-th training instance in X (unsupervised learning)
Xi An input feature in X
(i)
xj The value of feature j in i-th training instance
N ×D
X∈R Design matrix, where Xi ,: denotes x(i)
F Hypothesis space of functions to be learnt, i.e., a model
C[f ] A cost function of f ∈ F
(x0 , y 0 ) A testing pair
ŷ Label predicted by a function f , i.e., ŷ = f (x0 ) (supervised learning)

Pdata The data generating distribution


P (x, y) A data generating distribution
P̂data The empirical distribution defined by the X

Machine Learning, Data Mining, Big Data, First Edition. ix


By Dewan Md. Farid Copyright c 2025 United International University.
PART I

LEARNING FROM DATA


CHAPTER 1

INTRODUCTION

Imagination is more important than knowledge. Knowledge is limited. Imagination encir-


cles the world.
—Albert Einstein, Physicist of the 20th century

Intelligence is the ability to adapt to change.


—Stephen William Hawking, Theoretical Physicist

1.1 Computational Intelligence

Computational Intelligence or Intelligent Computing also known as Soft Com-


puting, is the process of Knowledge Engineering and applying advanced infor-
mation processing techniques that deals with creating mining algorithms/classifiers,
and systems that can learn from Big Data and make decisions to predict the future.
It refers to the ability of a computer to solve a specific task from experimental ob-
servation. It’s a multidisciplinary field including Advance Artificial Intelligence,
Machine Learning, Deep Learning, Data Mining, Data Science, Big Data, Pat-
Machine Learning, Data Mining, Big Data, First Edition. 3
By Dewan Md. Farid Copyright c 2025 United International University.
4 INTRODUCTION

tern Recognition, Knowledge-Based Systems, Decision Support Systems, High-


Performance Computing, Market Intelligence, etc. Knowledge Engineering (KE)
is the process of mimicking the judgment and behaviour of a human to create expert
systems that was defined by Edward Feigenbaum and Pamela McCorduck in 1983.
KE is a branch of artificial intelligence (AI) that involves machines to solve complex
problems normally requiring a high level of human expertise.
Artificial Intelligence (AI) creates intelligent machines to mimic human intelli-
gence that work and react like a human brain. How does the human brain process the
data and information? How can a machine perform a task? E.g. Playing Chess/Tic-
Tac-Toe against a computer is an example of artificial intelligence. The term ”Ar-
tificial Intelligence” was coined by emeritus Stanford Professor John McCarthy (an
American computer scientist) in 1955 and he is one of the founding fathers of artifi-
cial intelligence, together with Alan Turing, Marvin Minsky, Allen Newell, and Her-
bert A. Simon. In 1950, Alan Mathison Turing (a British mathematician) published a
seminal paper titled “Computer Machinery and Intelligence” in Mind, Vol. 59, No.
236 (Oct., 1950), pp. 433-460, which proposed a test of machine intelligence called
“The Imitation Game”. He first proposed to consider the question, “Can machines
think?”. In 1936, Alan Turing invented a mathematical model of a universal machine
(the original idealised model of a computer), which later known as Turing Machine,
a code-breaking machine successfully cracked the German cypher machine, Enigma
(used to encipher and decipher messages). In 1952, Arthur Lee Samuel (professor
of electrical engineering at the University of Illinois) developed a program to play
checkers, which is the first to ever learn the game independently.

Figure 1.1: Alan Turing invented The Turing Machine in 1936.

Machine learning (ML) is a branch of Artificial Intelligence that involves to de-


velop self learning algorithms for automatically extracting rules from Big Data in or-
der to make data-driven decisions. In ML, we believe what happened yesterday will
happen tomorrow. Instead of any human experts, ML is turning things (Big Data)
into numbers and finding patterns in those numbers. It enables the machine to learn
from experience without being specifically programmed. ML is used in many real-
life applications, e.g. internet search engines, email filters to sort out spam, detecting
COMPUTATIONAL INTELLIGENCE 5

intrusions/unusual transactions, image classification etc. The term machine learning


was coined in 1959 by Arthur Samuel, “Machine Learning: Field of study that gives
computers the ability to learn without being explicitly programmed”. ML is also
known as self-teaching computers. Generally, machine learning is the process of ex-
tracting rules from Big Data for knowledge mining. In 1998, Tom M. Mitchell (an
American computer scientist and the Founders University Professor Machine Learn-
ing Department at Carnegie Mellon University) defined machine learning as “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”.
Deep Learning (DL) is a sub-field of machine learning in which multilayer Artifi-
cial Neural Networks (ANN) is learned from Big Data to mimic the learning process
of the human brain. DL is currently considered a universal learning algorithm, us-
able for all types of machine learning applications, including: Image recognition to
identify objects and features in images, such as people, animals, places, etc. Es-
sentially, all deep learning is machine learning, and all machine learning is artificial
intelligence, but not all artificial intelligence is machine learning.
Data Mining (DM) is also known as Knowledge Discovery from Data, or KDD
for short, which turns Big Data into knowledge. It’s the process of extracting knowl-
edge and uncovering hidden patterns from Big Data to understand the current and
future trends. The main object of data mining is to extract patterns (known and un-
known) from Big Data. The following definitions are found in different literatures:
(1) DM is the process of analysing Big Data from different perspectives and sum-
marising it into useful information, (2) DM is the process of finding hidden infor-
mation and patterns in Big Data, and (3) DM is the extraction of implicit, previously
unknown, and potentially useful information from Big Data.
Big Data (BD) is defined by 3 V’s: (1) Volume e.g. Big Data, (2) Variety e.g.
different types of input features, and (3) velocity e.g. streaming data. We can add
a few more V’s e.g. Variability, Veracity, Value, and Visualisation. Data Science
(DS) is the field of study that combines knowledge of Machine Learning and Data
Mining to extract knowledge and insights from structured and unstructured Big Data.
Data Analytics is a scientific process for transforming data into insights for making
better business decisions. A data scientist collects data from several sources and ap-
plies machine learning, predictive analytics, and sentiment analysis to extract critical
information from Big Data.

1.1.1 Why Machine Learning is Needed?


Can we think of engendering all of the rules in a Big Data problem? Machine learn-
ing can adapt (“learn”) new scenarios when the concepts are changing over the time.
The terms machine learning and data mining are commonly confused, as they often
employ the same methods, tools and techniques. They can be roughly defined as fol-
lows: (1) Machine learning focuses on prediction, based on known properties learned
from the X. (2) Data mining focuses on the discovery of unknown properties in the
X. There are many applications of machine learning e.g. credit card fraud detection,
6 INTRODUCTION

handwritten digit recognition, recommendations on websites, targeted ads on mobile


apps, sentiment analysis, crime pattern detection, drug effectiveness analysis, etc.

1.2 Data Terminology

Data is a collection of text, numbers, symbols, sound, picture or any recorded facts
in raw or unorganised form that can be processed by a computer. Data can be col-
lected from different sources, e.g. scientific data, medical data, demographic data,
financial data, and marketing data. It’s really important to have good quality data
for Machine Learning research and modelling. Engineering data is a challenging
and costly process, which is the most important part of all Data Analytics, Data
Mining, and Big Data research. In machine learning, data is basically the historical
records/past data points. Information is processed data e.g. grouped, normally by a
computer, to give it meaning and make it interpretable. The patterns, associations or
relationships in data can provide information. Knowledge is processed information
that is the understanding of information such as how to solve problems. Information
can be converted into knowledge about historical patterns and future trends. Fig.
1.2 illustrates the Data-Information-Knowledge-Wisdom (DIKW) pyramid the pro-
gression of raw data to valuable insights. Each level of the pyramid builds on lower
levels, and to effectively make data-driven decisions. Wisdom is the ability to make
well-informed decisions and take effective action based on understanding of the un-
derlying knowledge.

Figure 1.2: The Data-Information-Knowledge-Wisdom (DIKW) pyramid.

Real world data is generally incomplete, noisy, and inconsistent. Low quality
data will lead to low quality mining results. Generally, Big Data contains errors,
missing attribute values, and lacking certain attributes of interest. Data can be classi-
fied into four categories: Unstructured, Quasi-Structured, Semi-Structured and
Structured.

Unstructured Data is information that isn’t stored in a specific format. It has no


rigid structure, e.g. images, video, natural language text, and speech etc.
DATA TERMINOLOGY 7

Quasi-Structured Data is more of a textual data with erratic data formats. It can
be formatted. with effort, tools, and time. An example of quasi-structured data
is the data about webpages a user visited and in what order.

Semi-Structured Data refers to data that is not captured or formatted in conven-


tional ways. Semi-structured data does not follow the format of a tabular data
model or relational databases because it does not have a fixed schema.

Structured Data is smartly organised in tables, making it easy to search, which can
be classified as follows:

1. Nominal/Categorical (e.g. marital status, eye colour, political party etc)


2. Numerical (discrete: number of children, defects per hour; and continuous:
weight, sales, sensor stream data)
3. Ordinal data, which has order but the distance between values is unknown.
E.g. how would you rate your health from 1-5? where, 1 being poor, 5 being
healthy.
4. Time-series Data (Data across time), e.g. the historical scale values of gold
from 2012-2018.

Figure 1.3: Types of Structured Data.

Given a dataset, X = {x(1) , x(2) , · · · , x(n) }, each instance, x(i) , is represented by


D-dimension. The dataset, X, contains the following features {X1 , X2 , · · · , Xm }.
Each feature, Xi , has the feature values. The dataset, X, also belong to a set of
classes y = {y (1) , y (2) , · · · , y (p) }. In labelled data, each instance, x(i) , belongs to
a predefined class label, y (i) that allows the models to learn over time. In X, each
instance is characterised by the values of features that measure different aspects of
the instance.

Concept is the machine learning model or classifier that to be learned.

Concept description is the output produced by a machine learning classifier.

Instances can be classified or associated or clustered. Each dataset is represented


as a matrix of instances versus features.
8 INTRODUCTION

Feature is a data field, representing a characteristic of an instance. The value of a


feature for a particular instance is a measurement of the quantity to which the
feature refers.

Table 1.1: The Nouns are Often used Interchangeably in the Literature.

Instance Data point, Example, Object, Observation, Row, Record, Sample, Tuple, Vector
Feature Attribute, Column, Dimension, Feature, Field, Parameter, Variable

1.3 Five Types of Data Analytics

There are five main types of data analytics: descriptive analytics, diagnostic analyt-
ics, predictive analytics, prescriptive analytics, and cognitive analytics. The types of
data analytics each answer a different question:

1. Descriptive analytics: What is currently happening?

2. Diagnostic analytics: Why is this happening?

3. Predictive analytics: What is going to happen in the future?

4. Prescriptive analytics: What is the best path forward?

5. Cognitive analytics: How can we continue to learn and improve?

Descriptive analytics are a statistical interpretation used to analyse historical data


to identify patterns and relationships. It takes Big Data and uses machine learning
tools and techniques to split it into digestible units that can help businesses learn
about their past successes and failures. This type of analytics often takes advantage
of visualisation tools like dashboards. Descriptive analytics can help to identify the
areas of strength and weakness in an organisation. Examples of metrics used in de-
scriptive analytics include year-over-year pricing changes, month-over-month sales
growth, the number of users, or the total revenue per subscriber.
Diagnostic analytics examine data to understand the root causes of events, be-
haviours, and outcomes. It addresses the data found in descriptive analytics and
drills down to identify the reasons or factors that may be affecting the business. Data
analysts use diverse techniques and tools to identify patterns, trends, and connections
to explain why certain events occurred.
Predictive analytics use statistical methods and machine learning algorithms to
identify the likelihood of future outcomes based on historical data. It is commonly
used for forecasting, risk management, customer behaviour analytics, fraud detec-
tion, and operational optimisation, etc.
Prescriptive analytics use of advanced processes and tools to analyse data and
content to recommend the optimal course of action or strategy moving forward. It
MACHINE LEARNING TECHNIQUES 9

allows businesses to make educated decisions and feel confident in their plan of
action, even when times may feel uncertain.
Cognitive Analytics applies human-like intelligence to certain tasks, and brings
together a number of intelligent technologies, including machine learning, deep learn-
ing, and data mining. An organisation might use cognitive analytics to monitor their
customer behaviour patterns and emerging trends.

1.4 Machine Learning Techniques

The general idea of machine learning is to develop concepts/models/classifiers from


historical Big Data for acquiring knowledge through experience. Machine learning
techniques are mainly bifurcated into (1) Supervised Learning, and (2) Unsupervised
Learning. Supervised learning trains a model on labeled data (known input and out-
put data) so that it can predict the future outputs. Unsupervised learning finds hidden
patterns on unlabelled data.

1.4.1 Supervised Learning


Supervised learning in machine learning is a process of building learning models
or classifiers using labeled training data, X to predict outcomes, ŷ. The goal is to
map the function f (X) = ŷ so well that the new input instance x0 can be classi-
fied correctly. The most commonly used supervised learning algorithms are linear
regression, logistic regression, support vector machine, k-nearest neighbours, naı̈ve
Bayes classifier, and decision tree etc. Supervised learning can be bifurcated into the
following tasks:

Regression It finds the relationship between independent variables, X1 , X2 , · · · , Xm


and dependent variable, y where y is numerical/real/continuous. The formula
for regression is yi = f (Xi , β) + ei , where β is parameters and ei is error.
Linear regression is one of the most common forms of regression analysis that
is used in prediction and forecasting. For example, it can determine which mar-
keting channels or advertising strategies influence sales most.

Classification It refers to the predictive modelling problems where the class-values/labels


of y is categorical/nominal/discrete, i.g. classify if an email is spam or not.
Classification is used to assign categories to instances. Examples include sup-
port vector machines (SVMs), logistic regression, and decision trees. There are
three types of classification problems:

1. Binary-class classification that illustrates in Table 1.7.


2. Multi-class classification that illustrates in Table 1.4.
3. Multi-label classification (e.g. what items does this photo contain? What
topics is this YouTube video about?) that illustrates in Table 1.6.
10 INTRODUCTION

Table 1.2: Binary-class Classification.

X1 X2 X3 ··· XM y (i=0,1)
(1) (1) (1) (1)
x(1) x1 x2 x3 ··· xM y (i)
(2) (2) (2) (2)
x(2) x1 x2 x3 ··· xM y (i)
(3) (3) (3) (3)
x(3) x1 x2 x3 ··· xM y (i)
.. .. .. .. .. .. ..
. . . . . . .
(N ) (N ) (N ) (N )
x(N ) x1 x2 x3 ··· xM y (i)

To illustrate a binary-class classification problem, we can consider the small dataset


that is shown in Table 1.3. The Weather Data is described by four input features
namely Outlook, Temperature, Humidity, and Wind, which represent the weather
condition of 14 days. Each feature has several unique feature values. The Play col-
umn in Table 1.3 represents the decision/class category of each day, which indicates
whether a particular weather condition is suitable or not for playing tennis.

Table 1.3: The Weather Data: A Binary Classification Problem.

Day Outlook Temperature Humidity Wind Play


Day1 Sunny Hot High Weak No
Day2 Sunny Hot High Strong No
Day3 Overcast Hot High Weak Yes
Day4 Rain Mild High Weak Yes
Day5 Rain Cool Normal Weak Yes
Day6 Rain Cool Normal Strong No
Day7 Overcast Cool Normal Strong Yes
Day8 Sunny Mild High Weak No
Day9 Sunny Cool Normal Weak Yes
Day10 Rain Mild Normal Weak Yes
Day11 Sunny Mild Normal Strong Yes
Day12 Overcast Mild High Strong Yes
Day13 Overcast Hot Normal Weak Yes
Day14 Rain Mild High Strong No

A multi-class classification problem is illustrated in Table 1.5. The Data for


Height Classification has three features namely Name, Gender, Height, and a class-
feature named Output. The class-feature Output has three values: Short, Medium,
and Tall, so it’s a multi-class classification problem.

1.4.2 Unsupervised Learning

Unsupervised learning, also known as clustering, is used to group unlabelled data


(when we only have the input data, X with no corresponding class-values) for finding
patterns/similarities and interesting structure in Big Data. The goal for unsupervised
MACHINE LEARNING TECHNIQUES 11

Table 1.4: Multi-class Classification.

X1 X2 X3 ··· XM y (i=0,1,2,...,P )
(1) (1) (1) (1)
x(1) x1 x2 x3 ··· xM y (i)
(2) (2) (2) (2)
x(2) x1 x2 x3 ··· xM y (i)
(3) (3) (3) (3)
x(3) x1 x2 x3 ··· xM y (i)
.. .. .. .. .. .. ..
. . . . . . .
(N ) (N ) (N ) (N )
x(N ) x1 x2 x3 ··· xM y (i)

Table 1.5: The Data for Height Classification: A Multi-class Classification Problem.

No Name Gender Height Output


1 Kristina F 1.6 m Short
2 Jim M 2m Tall
3 Maggie F 1.9 m Medium
4 Martha F 1.88 m Medium
5 Stephanie F 1.7 m Short
6 Bob M 1.85 m Medium
7 Kathy F 1.6 m Short
8 Dave M 1.7 m Short
9 Worth M 2.2 m Tall
10 Steven M 2.1 m Tall
11 Debbie F 1.8 m Medium
12 Todd M 1.95 m Medium
13 Kim F 1.9 m Medium
14 Amy F 1.8 m Medium
15 Wynette F 1.75 m Medium

Table 1.6: Multi-label Classification.

X1 X2 X3 ··· XM y (i=0,1,2,...,P ) y (j=0,1,2,...,P )


(1) (1) (1) (1)
x(1) x1 x2 x3 ··· xM y (i) y (j)
(2) (2) (2) (2)
x(2) x1 x2 x3 ··· xM y (i) y (j)
(3) (3) (3) (3)
x(3) x1 x2 x3 ··· xM y (i) y (j)
.. .. .. .. .. .. .. ..
. . . . . . . .
(N ) (N ) (N ) (N )
x(N ) x1 x2 x3 ··· xM y (i) y (j)

learning is to model the underlying structure or distribution in the data in order to


learn more about the data. Therefore, in unsupervised learning we have only data
but no labels. Unsupervised learning model tries to find the pattern in data without
something to reference on. Clustering is commonly used for dimensionality reduc-
tion, e.g. PCA (Principal Component Analysis).
12 INTRODUCTION

Table 1.7: Unsupervised Learning - only Instances with No Labels.

X1 X2 X3 ··· XM
(1) (1) (1) (1)
x(1) x1 x2 x3 ··· xM
(2) (2) (2) (2)
x(2) x1 x2 x3 ··· xM
(3) (3) (3) (3)
x(3) x1 x2 x3 ··· xM
.. .. .. .. .. ..
. . . . . .
(N ) (N ) (N ) (N )
x(N ) x1 x2 x3 ··· xM

1.4.3 Other Types of Learning


There are several other types of machine learning techniques, which are discussed
below.

Semi-supervised learning It amalgamates supervised and unsupervised learning by


applying both labeled and unlabelled data to train machine learning models for
classification and regression tasks in supervised learning. In semi-supervised
data, we have both labeled and unlabelled training instances. Generally, semi-
supervised learning involves a small number of labeled instances and a large
number of unlabelled instances from which a model must learn and make pre-
dictions on new instances.

Reinforcement Learning It focuses on decision making by an autonomous agent


(algorithm), which performs actions in an environment and is rewarded or pe-
nalised based on whether the actions were favourable or not. An agent can be a
system, which makes decisions and acts in response to its environment indepen-
dent of direct instruction by a human user. In reinforcement learning, there’s no
training data and the agent works on a rewards-based system. The agent selects
an action in an environment by trial and error in the absence of any guidance
from a human user that will lead to rewards shown in Fig 1.4. Robots and
self-driving cars are examples of autonomous agents.

Figure 1.4: Reinforcement Learning.


MACHINE LEARNING LIFECYCLE - CRISP-ML(Q) 13

Association Analysis It’s a method used to identify the relationships between items
in Big Data e.g. market basket analysis, clickstream analysis, and cross-selling
recommendation engines etc. In association analysis, one input feature provides
information about another that is useful for discovering interesting relationships
hidden in Big Data.
Active Learning It’s a supervised approach that applies training data optimisation
techniques to continuously improve the performance of a machine learning clas-
sifier. In active learning, users (e.g., a domain expert) play an active role in the
learning process by asking to label unlabelled instances.
Transfer Learning It takes knowledge gained through one task or dataset, Xi is
used to improve model performance on another related task and/or different
dataset, Xj . E.g. Use of ImageNet, AlexNet, and Inception pre-trained models
for image detection and classification is an example of transfer learning. Trans-
fer learning commonly uses deep learning methods for mining Big Data.
Federated Learning It’s also known as collaborative learning was coined by Google
researchers in 2016 to focus on settings in which multiple entities (often re-
ferred to as clients) collaboratively train a model while ensuring that their data
remains decentralised. It mitigates the risk of compromising data security or
privacy while training the machine learning models.
Sequence to Sequence (Seq2Seq) It’s used for machine translation in natural lan-
guage processing, where models translate text from one language to another
e.g. given a sequence of English text, translate it into French. Seq2Seq models
are a specific type of recurrent neural network (RNN) to process and convert a
sequential data input into a specific sequential data output.

1.5 Machine Learning Lifecycle - CRISP-ML(Q)

Learning is the concept of estimating the model parameters so the predictions are cor-
rect for the new instances. The Cross-Industry Standard Process for the development
of Machine Learning applications with Quality assurance methodology (CRISP-
ML(Q)) presents the machine learning lifecycle, which is an industrial standard for
building sustainable machine learning applications shown in Fig. 1.5. The CRISP-
ML(Q) process model describes six phases:

1. Business and Data Understanding


2. Data Engineering (Data Preparation)
3. Machine Learning Model Engineering
4. Machine Learning Model Evaluation
5. Deployment
14 INTRODUCTION

Figure 1.5: CRISP-ML(Q): Approach to Quality Assurance in Machine Learning.

6. Monitoring and Maintenance

Business and Data Understanding In this phase, we need to identify the scope and
the business goals of the machine learning project, and also collect and analyse
the data. To collect the data we need to ask the following questions: (1) What
data sources already exist?, (2) What privacy concerns are there?, (3) Is the data
public?, and (4) Where should we store the data? etc.

Data Engineering (Data Preparation) This phase helps us to learn, understand,


and know the data, which involves Data Preprocessing, Exploratory Data Anal-
ysis (EDA), and Data Splitting for modelling. Data preprocessing includes: (1)
Feature Imputation (filling missing values), (2) Feature Encoding (turning val-
ues into numbers), (3) Feature Normalisation (scaling) or Standardisation, (4)
Feature Engineering: transform data into (potentially) more meaningful rep-
resentation by adding in domain knowledge, (5) Feature Selection (Remove
feature, Combine feature, Add feature), and (6) Data Balancing. EDA is learn-
ing about the data or understanding and knowing the data by using statistical
graphics and other data visualisation methods. Data Splitting is the process of
dividing a dataset into training (usually 70-80%), validation (typically 10-15%),
and testing sets Testing Set (10-15%).
List of Data Visualisation Tools:

Python ([Link]
DATA PREPROCESSING 15

Julia ([Link]
R ([Link]
Google for Developers Charts ([Link]
Timeline ([Link]
Tableau ([Link]
D3 ([Link]
Machine Learning Model Engineering This phase includes choosing appropriate
machine learning algorithms based on the problem and training the models.
Machine Learning Model Evaluation This phase includes tasks like model vali-
dation, testing, and documentation.
Deployment This phase involves deploying the model into production and making
it available to users, which includes model packaging, integration with other
systems, and monitoring performance.
Monitoring and Maintenance This phase involves monitoring the deployed model
and making adjustments as needed, which includes tracking model performance,
identifying and addressing issues, and retraining the model on new data.

1.6 Data Preprocessing

Data preprocessing transforms raw data into an understandable format. Real-world


data is often incomplete, inconsistent, and contains many errors. There are several
data preprocessing techniques: Data cleaning can be applied to remove noise and
correct inconsistencies in data. Data integration merges data from multiple sources
into a coherent data store such as a data warehouse. Data reduction can reduce data
size by, for instance, aggregating, eliminating redundant features, or clustering. Data
transformations (e.g., normalisation) may be applied, where data are scaled to fall
within a smaller range like 0.0 to 1.0. Data Quality Issues: (1) Inconsistent value,
(2) Duplicate value, (3) Missing value, (4) Invalid value, (5) Outliers.

Data cleaning Data is cleansed through processes such as filling in missing values,
smoothing the noisy data, or resolving the inconsistencies in the data. (Missing
values, Duplicate data, Inconsistent Data, Noise, Outliers). Data in the real
world is dirty. Lots of potentially incorrect data, e.g., instrument faulty, human
or computer error, transmission error. We can use domain expert knowledge to
correct inconsistent data. Table 1.8 shows some of the examples of noisy data.
Fill in missing attribute or class values:
1. Ignore the tuple: usually done when class label is missing.
2. Use the attribute mean (or majority nominal value) to fill in the missing
value or for all samples belonging to the same class.
16 INTRODUCTION

Table 1.8: Some Examples of Noisy Data

Noise Type Example


Missing attribute value Occupation = “ “ (missing data)
Containing errors Salary = “-10” (an error)
Containing discrepancies in codes Age = “42”, Birthday = “01/01/2010”
Intentionally entering value Jan. 1 as everyone’s birthday

3. Predict the missing value by using a learning algorithm: consider the at-
tribute with the missing value as a dependent (class) variable and run a
learning algorithm (usually Bayes or decision tree) to predict the missing
value.

Data integration Data with different representations are put together and conflicts
within the data are resolved, e.g., using multiple databases, data cubes, or files.
Data integration combines data from multiple sources into a coherent store,
e.g., integrate metadata (metadata is data about data or metadata is data that
describes other data) from different sources. It also detects and resolves data
value conflicts. Careful integration of the data from multiple sources may help
reduce/avoid redundancies and inconsistencies and improve mining speed and
quality.

Data transformation Data is normalised, aggregated and generalised. (Scaling,


Filtering, Dimensionality Reduction). Data transformation includes the follow-
ings:

1. Normalisation: Scaling attribute values to fall within a specified range.


2. Aggregation: moving up in the concept hierarchy on numeric attributes.
3. Generalisation: moving up in the concept hierarchy on nominal attributes.
4. Attribute construction: replacing or adding new attributes inferred by exist-
ing attributes.

Data reduction This step aims to present a reduced representation of the data in a
data warehouse. Data reduction obtains a reduced representation of the data
set that is much smaller in volume but yet produces the same (or almost the
same) analytical results. A database/data warehouse may store terabytes of data.
Complex data analysis may take a very long time to run on the complex dataset.

1. Reducing the number of attributes (removing irrelevant attributes e.g., in-


formation gain, principle component analysis).
2. Reducing the number of attribute values (reducing the number of attributes
by grouping them into intervals).
3. Reducing the number of tuples
EXTRACTING RULES FORM DATA 17

Data discretisation Involves the reduction of a number of values of a continuous


attribute by dividing the range of attribute intervals.

1. Unsupervised discretisation (class variable is not used): Equal-interval: split


the whole range of numbers in intervals with equal size, and Equal-frequency:
use intervals containing equal number of values.
2. Supervised discretisation (uses the values of the class variable): Using class
boundaries.
3. Generating concept hierarchies: recursively applying partitioning or dis-
cretisation methods.

1.7 Extracting Rules form Data

A set of rules learned from the Table 1.3.

1. If Outlook = Sunny and Humidity = High then Play = No

2. If Outlook = Sunny and Humidity = Normal then Play = Yes

3. If Outlook = Overcast then Play = Yes

4. If Outlook = Rain and Wind = Strong then Play = No

5. If Outlook = Rain and Wind = Weak then Play = Yes

In the slightly more complex form shown in Table 1.9, two of the attributes -
temperature and humidity have numeric values.

Table 1.9: Weather Data with Some Numeric Attributes.

Outlook Temperature Humidity Wind Play


Sunny 85 85 Weak No
Sunny 80 90 Strong No
Overcast 83 86 Weak Yes
Rain 70 96 Weak Yes
Rain 68 80 Weak Yes
Rain 65 70 Strong No
Overcast 64 65 Strong Yes
Sunny 72 95 Weak No
Sunny 69 70 Weak Yes
Rain 75 80 Weak Yes
Sunny 75 70 Strong Yes
Overcast 72 90 Strong Yes
Overcast 81 75 Weak Yes
Rain 71 91 Strong No
18 INTRODUCTION

A set of rules learned from the Table 1.9.

1. If Outlook = Sunny and Humidity > 75 then Play = No


2. If Outlook = Sunny and Humidity ≤ 75 then Play = Yes
3. If Outlook = Overcast then Play = Yes
4. If Outlook = Rain and Wind = Strong then Play = No
5. If Outlook = Rain and Wind = Weak then Play = Yes

1.8 Exercises

1. Define Machine Learning by “Tom Mitchell” (1998) definition?


2. What is the difference between supervised and unsupervised learning?
3. What is the difference between Data Mining and Data Analysis?
4. Define the differences of the followings: (a) Machine Learning and Data Min-
ing, (b) Classification and clustering, and (c) Concept and concept description.
5. What is data modelling and what is the need for it?
6. Define term outliers in machine learning?
7. What’s Decision Line? What are the basic steps use to design a pattern classifi-
cation system?
8. Explain the steps for building a predictive model to predict the house price at
Dhaka City.
9. What is data preparation? Why we need data pre-processing?
10. Why we need Clean Data? What are the techniques applied for dealing with
Missing Data?
11. What are the major steps used for Data Preparation in pattern classification
tasks?
12. What is feature imputation, encoding, normalisation, and engineering?
13. What is Data Sampling with Replacement and without Replacement?
14. What do you prefer (I) A noise free data, Or (II) A strong classifier? Justify
your answer.
15. Why attribute sub-set selection is necessary?
16. Write OneR algorithm and discuss its advantages and drawbacks.
EXERCISES 19

17. Find the classification rules from the following table using OneR technique.
18. What is validation set? How can we apply binary-class classification algorithm
for multi-class classification tasks? Explain with an example.
19. Write the major limitations of Data Sampling methods
20. Min-max normalisation to fall within specified range.

You might also like