0% found this document useful (0 votes)
4 views41 pages

Module 1 ML

The document provides an overview of machine learning, its relationship with artificial intelligence, data science, and statistics, as well as its various types including supervised, unsupervised, semi-supervised, and reinforcement learning. It also defines data and discusses the 6V's of big data, emphasizing the importance of data preprocessing to ensure data quality for effective machine learning. Additionally, it includes Tom Mitchell's definition of machine learning and highlights the challenges faced in the field.

Uploaded by

maherkainaf24
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)
4 views41 pages

Module 1 ML

The document provides an overview of machine learning, its relationship with artificial intelligence, data science, and statistics, as well as its various types including supervised, unsupervised, semi-supervised, and reinforcement learning. It also defines data and discusses the 6V's of big data, emphasizing the importance of data preprocessing to ensure data quality for effective machine learning. Additionally, it includes Tom Mitchell's definition of machine learning and highlights the challenges faced in the field.

Uploaded by

maherkainaf24
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

Module 1

Source: Uploaded Machine Learning Textbook

1)Discuss Machine Learning. Explain its relationship to other fields with diagram
Machine Learning

• Machine learning is an important sub-branch of Artificial Intelligence (AI).

• It frequently quoted definition of machine learning was by Arthur Samuel, one of the pioneers of Artificial
Intelligence.

• He stated that:

"Machine learning is the field of study that gives the computers ability to learn without being explicitly programmed."

• The key to this definition is that the systems should learn by itself without explicit programming.

• Machine learning is a branch of AI which aims to develop intelligent systems by learning from examples and
experience.

• The focus of AI is to develop intelligent systems by using data-driven approach, where data is used as an input
to develop intelligent models.

• The models can then be used to predict new inputs.

• Thus, the aim of machine learning is to learn a model or set of rules from the given dataset so that it can
predict the unknown data correctly.

Machine Learning in Relation to Other Fields

Machine learning uses the concepts of:

• Artificial Intelligence

• Data Science

• Statistics primarily

• It is the resultant of combined ideas of diverse fields.

1. Machine Learning and Artificial Intelligence

• Machine learning is an important branch of AI, which is a much broader subject.

• The aim of AI is to develop intelligent agents.

• An agent can be a robot, humans, or any autonomous systems.

• Initially, the idea of AI was ambitious, that is, to develop intelligent systems like Human beings.

• The focus was on logic and logical inferences.

• These moved down over the years and came under AI wrappers.

• The resurgence in AI happened due to developments of data driven systems.

• The aim is to find relations and regularities present in the data.

• Machine learning is the subbranch of AI, whose aim is to extract the patterns for prediction.
Module 1
• It is a broad field that includes learning from examples and also areas like reinforcement learning.

Diagram: Relationship of AI with Machine Learning

Artificial Intelligence

_______________________

Machine Learning

__________________

Deep Learning

______________

2. Machine Learning, Data Science, Data Mining, and Data Analytics

• Data science is an umbrella term that encompasses many fields.

• Machine learning starts with data.

• Therefore, data science and machine learning are interlinked.

• Machine learning is a branch of data science.

• Data science deals with gathering of data for analysis.

• It is a broad field that includes:

Big Data

• Data science concerns about collection of data.

• Big data is a field of data science that deals with following characteristics:

o Volume

o Variety

o Velocity

Data Mining

• Data mining's original genesis is in the business.

• Like while mining the earth one gets into precious resources, it is often believed that unearthing of the data
produces hidden information that otherwise would have eluded the attention of the management.

• Nowadays, many consider that data mining and machine learning are same.

• There is no difference between these fields except that data mining aims to extract the hidden patterns that are
present in the data, whereas machine learning aims to use it for prediction.

Data Analytics

• Data analytics is another branch of data analytics.

• It aims to extract useful knowledge from data.


Module 1
• There are different types of analytics.

• Predictive analytics is used for making predictions.

• Machine learning is closely related to this branch of analytics and shares almost all algorithms.

Pattern Recognition

• It is an engineering field.

• It uses machine learning algorithms to extract the features for pattern analysis and pattern classification.

• One can view pattern recognition as a specific application of machine learning.

Diagram: Relationship of Machine Learning with Other Major Fields

Data Science

-----------------------------------

| | |

Data Mining Machine Learning Data Analytics

Pattern Recognition

3. Machine Learning and Statistics

• Statistics is a branch of mathematics that has solid theoretical foundation regarding statistical learning.

• Like machine learning (ML), it can learn from data.

• But the difference between statistics and ML is that statistical methods look for regularity in data collection.

• Initially, statistics use hypothesis and perform experiments to verify and validate the hypothesis in order to find
relationships in data.

• Statistics requires knowledge of statistical procedures and the guidance of a good statistician.

• It is mathematics intensive and does depend on complicated equations and involve many assumptions.

• Statistical methods are developed in relation to the data being analysed.

• In addition, statistical methods are coherent and rigorous.

• It has strong theoretical foundation and interpretations that require a strong statistical knowledge.

• Machine learning, comparatively, has less assumptions and requires less statistical knowledge.

• But, it often requires interaction with various tools to automate the process of learning.

• Nevertheless, there is a school of thought that machine learning is just the latest version of old Statistics and
hence this relationship should be recognized.
Module 1
Source: Uploaded Machine Learning Textbook

2)Explain Different Types of Machine Learning with Diagram


Types of Machine Learning

• What does the word 'learn' mean? Learning, like adaptation, occurs as the result of interaction of the program
with its environment.

• It can be compared with the interaction between a teacher and a student.

• There are four types of machine learning.

Diagram: Types of Machine Learning

Machine Learning

------------------------------------------------

| | | |

Supervised Unsupervised Semi-supervised Reinforcement

learning learning learning learning

| |

------------ ----------------

| | | | |

Classification Regression Cluster Association Dimension

analysis reduction

1. Supervised Learning

• Supervised algorithms use labelled dataset.

• As the name suggests, there is a supervisor or teacher component in supervised learning.

• A supervised learning model is constructed and generates test data.

• In supervised learning algorithms, learning takes place in two stages.

First stage

• The teacher communicates the information to the student that the student is supposed to master.

• The student receives the information and understands it.

• During this stage, the teacher has no knowledge of whether the information is grasped by the student.

Second stage

• The teacher then asks the student a set of questions to find out how much information has been grasped by
the student.

• Based on these questions, the student is tested, and the teacher informs the student about his assessment.

• Supervised learning has two methods:


Module 1
1. Classification

2. Regression

Classification

• Classification is a supervised learning method.

• The input attributes of the classification algorithms are called independent variables.

• The target attribute is called label or dependent variable.

• The relationship between the input and target variable is represented in the form of a structure which is called
a classification model.

Some of the key algorithms of classification are:

• Decision Tree

• Random Forest

• Support Vector Machines

• Naive Bayes

• Artificial Neural Network and Deep Learning networks like CNN

Regression Models

• Regression models, unlike classification algorithms, predict continuous variables like price.

• In other words, it is a number.

2. Unsupervised Learning

• The second kind of learning is by self-instruction.

• As the name suggests, there are no supervisor or teacher components.

• In the absence of a supervisor or teacher, self-instruction is the most common kind of learning process.

• This process of self-instruction is based on the concept of trial and error.

• Here, the program is supplied with objects, but no labels are defined.

• The algorithm itself observes the examples and recognizes patterns based on the principles of grouping.

• Grouping is done in such a similar objects form the same group.

• Cluster analysis and Dimensional reduction algorithms are examples of unsupervised algorithms.

Cluster Analysis

• Cluster analysis is an example of unsupervised learning.

• It aims to group objects into disjoint clusters or groups.

• Cluster analysis groups objects based on its attributes.

Some of the key clustering algorithms are:

• k-means algorithm
Module 1
• Hierarchical algorithms

Dimensional Reduction

• Dimensionality reduction algorithms are examples of unsupervised algorithms.

• It takes a higher dimension data as input and outputs the data in lower dimensions by taking advantage of the
variance of the data.

3. Semi-supervised Learning

• There are circumstances where the dataset has a huge collection of unlabelled data and some labelled data.

• Labelling is a costly process and difficult to perform by the humans.

• Semi-supervised algorithms use unlabelled data by assigning a pseudo-label.

• Then, the labelled and pseudo-labelled dataset can be combined.

4. Reinforcement Learning

• Reinforcement learning mimics human beings.

• Like human beings use ears and eyes to perceive the world and take actions, reinforcement learning allows the
agent to interact with the environment to get rewards.

• The agent can be human, animal, robot, or any independent program.

• The rewards enable the agent to gain experience.

• The agent aims to maximize the reward.

• The reward can be positive or negative (Punishment).

• When the rewards are more, the behavior gets reinforced and learning becomes possible.

• In summary, compared to supervised learning, there is no supervisor or labelled dataset.

• Many sequential decisions need to be taken to reach the final decision.

• Therefore, reinforcement algorithms are reward-based, goal-oriented algorithms.

Source: Uploaded Machine Learning Textbook

3)Define Data. Explain 6V's of Big Data


Data

• All facts are data.

• In computer systems, bits encode facts present in numbers, text, images, audio, and video.

• Data can be directly human interpretable (such as numbers or texts) or diffuse data such as images or video
that can be interpreted only by a computer.
Module 1
• Today, business organizations are accumulating vast and growing amounts of data of the order of gigabytes,
tera bytes, exabytes and zetta bytes.

• A bit is 8 bits.

• A bit is either 0 or 1.

• A kilo byte (KB) is 1024 bytes.

• One mega byte (MB) is approximately 1000 KB.

• One giga byte is approximately 1,000,000 KB.

• 1000 giga bytes is one tera byte and 1000000 tera bytes is one Exa byte.

• Data by itself is meaningless.

• It has to be processed to generate any information.

• A string of bytes is meaningless.

• Only when a label is attached like height of students of a class, the data becomes meaningful.

• Processed data is called information that includes patterns, associations, or relationships among data.

6V's of Big Data

1. Volume

• Since there is a reduction in the cost of storing devices, there has been a tremendous growth of data.

• Small traditional data is measured in terms of gigabytes (GB) and terabytes (TB), but Big Data is measured in
terms of petabytes (PB) and exabytes (EB).

• One exabyte is 1 million terabytes.

2. Velocity

• The fast arrival speed of data and increase in data volume is noted as velocity.

• The availability of IoT devices and Internet power ensures that the data is arriving at a faster rate.

• Velocity helps to understand the relative growth of big data and its accessibility by users, systems and
applications.

3. Variety

• The variety of Big Data includes:

Form

• There are many forms of data.

• Data types range from text, graph, audio, video, to maps.

• There can be composite data too, where one media can have many other sources of data, for example, a video
can have an audio song.
Module 1
Function

• These are data from various sources like human conversations, transaction records, and old archive data.

Source of data

• This is the third aspect of variety.

• There are many sources of data.

• Broadly, the data source can be classified as open/public data, social media data and multimodal data.

4. Veracity

• Veracity of data deals with aspects like conformity to the facts, truthfulness, believability, and confidence in
data.

• There may be many sources of error such as technical errors, typographical errors, and human errors.

• So, veracity is one of the most important aspects of data.

5. Validity

• Validity is the accuracy of the data for taking decisions or for any other goals that are needed by the given
problem.

6. Value

• Value is the characteristic of big data that indicates the value of the information that is extracted from the data
and its influence on the decisions that are taken based on it.

Source: Uploaded Machine Learning Textbook

4)Explain Data Preprocessing with an Example


Data Preprocessing

• In real world, the available data is 'dirty'. By this word 'dirty', it means:

o Incomplete data

o Outlier data

o Data with inconsistent values

o Inaccurate data

o Data with missing values

o Duplicate data

• Data preprocessing improves the quality of the data mining techniques.


Module 1
• The raw data must be preprocessed to give accurate results.

• The process of detection and removal of errors in data is called data cleaning.

• Data wrangling means making the data processable for machine learning algorithms.

• Some of the data errors include:

o Human errors such as typographical errors

o Incorrect measurement

o Structural errors like improper data formats

o Omission and duplication of attributes

• Noise is a random component and involves distortion of a value or introduction of spurious objects.

• Often, the noise is used if the data is a spatial or temporal component.

• Certain deterministic distortions in the form of a streak are known as artifacts.

Example: Illustration of "Bad" Data

Patient ID Name Age Date of Birth (DoB) Fever Salary

1 John 21 Low -1500

2 Andre 36 High Yes

3 David 5 10/10/1980 Low " "

4 Raju 136 High Yes

From the given example:

• It can be observed that data like Salary = " " is incomplete data.

• The DoB of patients John, Andre, and Raju is missing data.

• The age of David is recorded as "5" but his DoB indicates it is 10/10/1980.

• This is called inconsistent data.

• Inconsistent data occurs due to:

o Problems in conversions

o Inconsistent formats

o Difference in units

• Salary for John is −1500.

• It cannot be less than "0".

• It is an instance of noisy data.

• Outliers are data that exhibit the characteristics that are different from other data and have very unusual
values.
Module 1
• The age of Raju cannot be 136.

• It might be a typographical error.

• It is often required to distinguish between noise and outlier data.

• Outliers may be legitimate data and sometimes are of interest to the data mining algorithms.

• These errors often come during data collection stage.

• These must be removed so that machine learning algorithms yield better results as the quality of results is
determined by the quality of input data.

• This removal process is called data cleaning.

REGULAR PAPER

Source: Uploaded Machine Learning Textbook


1)State Tom Mitchell's definition of Machine Learning
Tom Mitchell's definition of machine learning is:
• "A computer program is said to learn from experience E with respect to task T
and some performance measure P, if its performance at task T, as measured by
performance measure P, improves with experience E."
The important components of this definition are:
• Task T
• Experience E
• Performance measure P

List and Explain the Challenges of Machine Learning


Problems that can be Dealt with Machine Learning
• Computers are better than humans in performing tasks like computation.
• For example, while calculating the square root of large numbers, an average
human may blink but computers can display the result in seconds.
• Computers can pay games like chess, Go, and even beat professional players of
that game.
• However, humans are better than computers in many aspects like recognition.
Module 1
• But, deep learning systems challenge human beings in this aspect as well.
• Machines can recognize human faces in a second.
• Still, there are tasks where humans are better as machine learning systems still
require quality data for model prediction.
• The quality of a learning system depends on the quality of data.
• This is a challenge.
Some of the challenges of machine learning are:
1. Problems
• Machine learning can deal with the well-posed problems where specifications
are complete and available.
• Computers cannot solve 'ill-posed' problems.

2. Huge data
• This is a primary requirement of machine learning.
• Availability of a quality data is a challenge.
• A quality data means it should be large and should not have data problems
such as missing data or incorrect data.

3. High computation power


• With the availability of Big Data, the computational resource requirement has
also increased.
• Systems with Graphics Processing Unit (GPU) or even Tensor Processing Unit
(TPU) are required to execute machine learning algorithms.
• Also, machine learning tasks have become complex and hence time complexity
has increased, and therefore solved only with high computing power.

4. Complexity of the algorithms


• The selection of algorithms, describing the algorithms, application of algorithms
to solve machine learning task, and comparison of algorithms have become
necessary for machine learning algorithms.
Module 1
• Algorithms have become less topic of discussion and it is challenge for
scientists learning professionals to design, select, and evaluate optimal
algorithms.

5. Bias/Variance
• Variance is the error of the model.
• This leads to a problem called bias/variance tradeoff.
• A model that fits the training data correctly but fails to test data is called
overfitting.
• The reverse problem is called underfitting where the model fails for training
data but has good generalization.
• Overfitting and underfitting are great challenges for machine learning
algorithms.

Source: Uploaded Machine Learning Textbook


2)List and explain the visualization aids available for univariate data
analysis with example for each
Visualization aids available for univariate data analysis
The graphs that are used in univariate data analysis are:
1. Bar Chart
2. Pie Chart
3. Histogram
4. Dot Plots
5. Stem and Leaf Plot
6. Q-Q Plot

1. Bar Chart
• A Bar chart (or Bar graph) is used to display the frequency distribution for
variables.
Module 1
• Bar charts are used to illustrate discrete data.
• The charts can also help to explain the counts of nominal data.
• It also helps in comparing the frequency of different groups.
Example
• Student marks with Student ID (1,2,3,4,5) and marks (45,60,60,80,85).

2. Pie Chart
• These are equally helpful in illustrating the univariate data.
• The percentage frequency distribution of students marks
(22,22,40,40,70,70,85,90,90) is shown in Pie chart.
• The total number of students are represented as 100%.
Example
• Student marks:
22,22,40,40,70,70,85,90,90

3. Histogram
• Histograms convey useful information like nature of data and its mode.
• Mode indicates the peak of dataset.
• Histograms can be used as charts to show frequency, skewness present in the
data, and shape.
Example
• Student marks:
45,60,60,80,85
• Group ranges:
0–25, 26–50, 51–75, 76–100

4. Dot Plots
• These are similar to bar charts.
• They are less clustered as compared to bar charts.
Module 1
• The advantage is that by visual inspection one can find out what got more
marks.
Example
• Student marks for students with ID (1,2,3,4,5) and marks (45,60,60,80,85).

5. Stem and Leaf Plot


• A stem and leaf plot are display that helps us to know the shape and
distribution of the data.
• It splits the left of the decimal from the right of the decimal mostly from the
stem.
Example
For given English Marks:
45,60,60,80,85
Stem | Leaf
4|5
5|
6|00
7|
8|05

6. Q-Q Plot
• Most of the statistical tests are designed only for normal distribution of data.
• A Q-Q plot can be used to assess the shape of the distribution.
• The Q-Q plot is a 2D scatter plot of univariate data against theoretical normal
distribution.
Example
• Data:
x = [13 11 2 3 4 8 9]
• The quartiles of the first and second datasets are compared.
Module 1
You're correct. I should have followed your uploaded content exactly and preserved
the notation used in the textbook.
Source: Uploaded Machine Learning Textbook
3)For patients' age list {12,14,19,22,24,26,28,31,34}, find the IQR
Given:
Patients age list = {12,14,19,22,24,26,28,31,34}
Solution
• The median is in the fifth position.
• In this case,
[
24
]
is the median.
• The first quartile is median of the scores below the median i.e.,
[
{12,14,19,22}
]
• Hence, it is the median of the list below 24.
• In this case, the median is the average of the second and third values.
[
Q_{0.25}=16.5
]
• Similarly, the third quartile is the median of the values above the median, that
is,
[
{26,28,31,34}
]
• So,
[
Q_{0.75}
]
is the average of the seventh and eighth score.
Module 1
[
28+\frac{31}{2}
\frac{59}{2}
29.5
]
Hence, the IQR using Eq. (2.10) is:
IQR=Q_{0.75}-Q_{0.25}
[
=29.5-16.5
]
[
=13
]
Answer: IQR = 13

QUESTION BANK
Source: Uploaded Machine Learning Textbook
1)Applications of Machine Learning
• Machine Learning technologies are used widely now in different domains.
• Machine learning applications are everywhere.
• One encounters many machine learning applications in the day-to-day life.

1. Sentiment analysis
• This is an application of natural language processing (NLP) where the words of
documents are converted to sentiments like:
o Happy
o Sad
o Angry
• These are captured by emoticons effectively.
Module 1
• For movie reviews or product reviews, five stars or one star are automatically
attached using sentiment analysis programs.

2. Recommendation systems
• These are systems that make personalized purchases possible.
• For example:
o Amazon recommends users to find related books or books bought by
people who have the same taste like you.
o Netflix suggests shows or related movies of your taste.
• The recommendation systems are based on machine learning.

3. Voice assistants
• Products like:
o Amazon Alexa
o Microsoft Cortana
o Apple Siri
o Google Assistant
• are all examples of voice assistants.
• They take speech commands and perform tasks.
• These chatbots are the result of machine learning technologies.

4. Technologies using navigation


• Technologies like Google Maps and those used by Uber are all examples of
machine learning.
• They offer to locate and navigate shortest paths to reduce time.

Machine Learning Applications in Different Problem Domains


[Link] Problem Domain Applications
Module 1
[Link] Problem Domain Applications
1 Business Predicting the bankruptcy of a business firm
Prediction of bank loan defaulters and detecting credit card
2 Banking
frauds
Image search engines, object identification, image
3 Image Processing
classification, and generating synthetic images
Chatbots like Alexa, Microsoft Cortana. Developing
4 Audio/Voice chatbots for customer support, speech to text, and text to
voice
Trend analysis and identification of bogus calls, fraudulent
5 Telecommunication
calls and its callers, churn analysis
Retail sales analysis, market basket analysis, product
6 Marketing performance analysis, market segmentation analysis, and
study of travel patterns of customers for marketing tours
7 Games Game programs for Chess, GO, and Atari video games
Natural Language Google Translate, Text summarization, and sentiment
8
Translation analysis
Identification of access patterns, detection of e-mail spams,
Web Analysis and viruses, personalized web services, search engines like
9
Services Google, detection of promotion of user websites, and
finding loyalty of users after web page layout modification
Prediction of diseases, given disease symptoms as cancer or
diabetes. Prediction of effectiveness of the treatment using
10 Medicine
patient history and Chatbots to interact with patients like
IBM Watson uses machine learning technologies
Face recognition/identification, biometric projects like
Multimedia and
11 identification of a person from a large image or video
Security
database, and applications involving multimedia retrieval
Discovery of new galaxies, identification of groups of
houses based on house type/geographical location,
12 Scientific Domain
identification of earthquake epicenters, and identification of
similar land use
Module 1

Source: Uploaded Machine Learning Textbook


2)Explain the Knowledge Pyramid and its relation with Machine Learning
• Before starting the machine learning journey, the terms:
o Data
o Information
o Knowledge
o Intelligence
o Wisdom
are established.
• A knowledge pyramid is shown below.
Diagram: Knowledge Pyramid
Wisdom


Intelligence
(applied knowledge)


Knowledge
(condensed information)


Information
(processed data)

Module 1

Data
(mostly available as raw facts and symbols)

Data
• All facts are data.
• Data can be numbers or text that can be processed by a computer.
• Today, organizations are accumulating vast and growing amounts of data with
data sources such as:
o Flat files
o Databases
o Data warehouses in different storage formats

Information
• Processed data is called information.
• This includes:
o Patterns
o Associations
o Relationships among data
• For example:
o Sales data can be analyzed to extract information like which is the fast
selling product.

Knowledge
• Condensed information is called knowledge.
• For example:
o The historical patterns and future trends obtained in the above sales
data can be called knowledge.
• Unless knowledge is extracted, data is of no use.
Module 1
Intelligence
• Knowledge is not useful unless it is put into action.
• Intelligence is the applied knowledge for actions.
• An actionable form of knowledge is called intelligence.
• Computer systems have been successful till this stage.

Wisdom
• The ultimate objective of the knowledge pyramid is wisdom.
• Wisdom represents the maturity of mind that is, so far, exhibited only by
humans.

Relation with Machine Learning


• Here comes the need for machine learning.
• The objective of machine learning is to process these archival data for
organizations:
o To take better decisions
o To design new products
o To improve the business processes
o To develop effective decision support systems

You're right — my previous answer added outside information. Following your rule
(only use uploaded content, preserve wording, point-wise format):
Source: Uploaded Machine Learning Textbook
3)Differentiate between Structured Data and Unstructured Data
Structured Data Unstructured Data
In structured data, data is stored in an organized
Unstructured data includes
manner such as a database where it is available in the
Module 1
Structured Data Unstructured Data
form of a table. video, image, and audio.
It also includes textual
The data can also be retrieved in an organized
documents, programs, and blog
manner using tools like SQL.
data.
The structured data frequently encountered in It is estimated that 80% of the
machine learning are: data are unstructured data.
Record Data
Data Matrix
Graph Data
Ordered Data
Examples of ordered data:
Temporal data
Sequence data
Spatial data

Source: Uploaded Machine Learning Textbook


Big Data Analysis Framework consists of four layered architecture – Explain
• For performing data analytics, many frameworks are proposed.
• All proposed analytics frameworks have some common factors.
• Big data framework is a layered architecture.
• Such an architecture has many advantages such as genericness.
• A 4-layer architecture has the following layers:
1. Data connection layer
2. Data management layer
3. Data analytics layer
Module 1
4. Presentation layer

1. Data Connection Layer


• It has data ingestion mechanisms and data connectors.
• Data ingestion means taking raw data and importing it into appropriate data
structures.
• It performs the tasks of ETL process.
• By ETL, it means:
o Extract
o Transform
o Load operations

2. Data Management Layer


• It performs preprocessing of data.
• The purpose of this layer is to allow parallel execution of queries, and read,
write and data management tasks.
• There may be many schemes that can be implemented by this layer such as:
o Data-in-place, where the data is not moved at all
o Constructing data repositories such as data warehouses
o Pull data on-demand mechanisms

3. Data Analytic Layer


• It has many functionalities such as:
o Statistical tests
o Machine learning algorithms to understand
o Construction of machine learning models
• This layer implements many model validation mechanisms too.

4. Presentation Layer
Module 1
• It has mechanisms such as dashboards, and applications that display the results
of analytical engines and machine learning algorithms.

Big Data processing cycle consists of the following steps


1. Data collection
2. Data preprocessing
3. Applications of machine learning algorithm
4. Interpretation of results and visualization of machine learning algorithm
• This is an iterative process and is carried out on a permanent basis to ensure
that data is suitable for data mining.

Source: Uploaded Machine Learning Textbook


4)What is Binning?
Binning
• Noise is a random error or variance in a measured value.
• It can be removed by using binning.
• Binning is a method where the given data values are sorted and distributed
into equal frequency bins.
• The bins are also called as buckets.
• The binning method then uses the neighbor values to smooth the noisy data.
• Some of the techniques commonly used are:
o Smoothing by means
o Smoothing by medians
o Smoothing by bin boundaries
• The maximum and minimum values are called bin boundaries.
• Binning methods may be used as a discretization technique.

Given:
Module 1
[
S={12,14,19,22,24,26,28,31,34}
]
The data is already sorted.
Divide into 3 equal frequency bins:
Bin 1
[
{12,14,19}
]
Bin 2
[
{22,24,26}
]
Bin 3
[
{28,31,34}
]

1. Smoothing by Means
Calculate mean for each bin.
Bin 1 Mean
[
\frac{12+14+19}{3}
]
[
=15
]
Result:
[
{15,15,15}
]
Bin 2 Mean
Module 1
[
\frac{22+24+26}{3}
]
[
=24
]
Result:
[
{24,24,24}
]
Bin 3 Mean
[
\frac{28+31+34}{3}
]
[
=31
]
Result:
[
{31,31,31}
]
Final result:
[
{15,15,15,24,24,24,31,31,31}
]

2. Smoothing by Medians
Bin 1 Median
[
14
]
Result:
Module 1
[
{14,14,14}
]
Bin 2 Median
[
24
]
Result:
[
{24,24,24}
]
Bin 3 Median
[
31
]
Result:
[
{31,31,31}
]
Final result:
[
{14,14,14,24,24,24,31,31,31}
]

3. Smoothing by Bin Boundaries


Replace values by closest boundary.
Bin 1 : {12,14,19}
Boundaries:
[
12,19
]
Result:
Module 1
[
{12,12,19}
]

Bin 2 : {22,24,26}
Boundaries:
[
22,26
]
Result:
[
{22,22,26}
]

Bin 3 : {28,31,34}
Boundaries:
[
28,34
]
Result:
[
{28,28,34}
]
Final result:
[
{12,12,19,22,22,26,28,28,34}
]
Source: Uploaded Machine Learning Textbook
5)What are the different ways of Data Transformation?
• Data transformation routines perform operations like normalization to improve
the performance of the data mining algorithms.
• It is necessary to transform data so that it can be processed.
Module 1
• This can be considered as a preliminary stage of data conditioning.
• Normalization is one such technique.
• In normalization, the attribute values are scaled to fit in a range (say 0–1) to
improve the performance of the data mining algorithm.
• Often, in neural networks, these techniques are used.
• Some of the normalization procedures used are:
1. Min-Max
2. z-Score

1. Min-Max Procedure
• It is a normalization technique where each variable V is normalized by its
difference with the minimum value divided by the range to a new range, say 0–
1.
• Often, neural networks require this kind of normalization.
Formula:
min\text{-}max=\frac{V-min}{max-min}\times(new\ max-new\ min)+new\ min
• Here max-min is the range.
• Min and max are the minimum and maximum of the given data.
• New max and new min are the minimum and maximum of the target range,
say 0 and 1.

2. z-Score Normalization
• This procedure works by taking the difference between the field value and
mean value, and by scaling this difference by standard deviation of the
attribute.
Formula:
V^{*}=\frac{V-\mu}{\sigma}
• Here, σ is the standard deviation of the list V and μ is the mean of the list V.
• z-scores are used to detect outlier detection.
Module 1
• If the data value z-score function is either less than −3 or greater than +3, then
it is possibly an outlier.
• The major disadvantage of z-score function is that it is extremely sensitive to
outliers as it is dependent on mean.

Source: Uploaded Machine Learning Textbook


6)Consider the set S = {88, 90, 92, 94}. Apply Min-Max procedure and
map the marks to a new range {0,1}
Given:
[
V={88,90,92,94}
]
• The minimum of the list V is:
[
88
]
• The maximum is:
[
94
]
• The new min and new max are:
[
0 \text{ and }1
]
The mapping can be done using Eq. (2.1):
min\text{-}max=\frac{V-min}{max-min}\times(1-0)+0
For marks 88
[
min\text{-}max
\frac{88-88}{94-88}\times(1-0)+0
]
Module 1
[
=0
]

For marks 90
[
min\text{-}max
\frac{90-88}{94-88}\times(1-0)+0
]
[
0.33
]

For marks 92
[
min\text{-}max
\frac{92-88}{94-88}\times(1-0)+0
]
[
\frac{4}{6}
0.66
]

For marks 94
[
min\text{-}max
\frac{94-88}{94-88}\times(1-0)+0
]
[
\frac{6}{6}
Module 1
1
]

• So, it can be observed that the marks


[
{88,90,92,94}
]
are mapped to the new range
[
{0,0.33,0.66,1}
]
• Thus, the Min-Max normalization range is between 0 and 1.

Source: Uploaded Machine Learning Textbook


7)Differentiate between Quantitative and Qualitative Data
Qualitative Data (Categorical Data) Quantitative Data (Numerical Data)
The categorical data can be divided into
It can be divided into two categories.
two types.
Types: Types:
1. Nominal type 1. Interval type
2. Ordinal type 2. Ratio type
Nominal data are symbols and cannot be Interval data is a numeric data for which the
processed like a number. differences between values are meaningful.
Nominal data type provides only
For ratio data, both differences and ratio are
information but has no ordering among
meaningful.
data.
Ordinal data provides enough The difference between ratio and interval
information and has natural order. data is the position of zero in the scale.
Example: Fever = {Low, Medium, High} Example of interval data: Difference between
is an ordinal data. 30 degree and 40 degree.
Module 1

Source: Uploaded Machine Learning Textbook


8)How is the data classified based on the number of variables?
• The third way of classifying the data is based on the number of variables used
in the dataset.
• Based on that, the data can be classified as:
1. Univariate data
2. Bivariate data
3. Multivariate data

Diagram: Types of Data Based on Variables


Data
|
-------------------------
| | |
Univariate Bivariate Multivariate
data data data

Univariate Data
• In case of univariate data, the dataset has only one variable.
• A variable is also called as category.

Bivariate Data
• Bivariate data indicates that the number of variables used are two.

Multivariate Data
• Multivariate data uses three or more variables.
Module 1

Source: Uploaded Machine Learning Textbook


9)Explain the different measures of central tendency with suitable examples
• One cannot remember all the data.
• Therefore, a condensation or summary of the data is necessary.
• This makes the data analysis easy and simple.
• One such summary is called central tendency.
• Thus, central tendency can explain the characteristics of data and that further
helps in comparison.
• Mass data have tendency to concentrate at certain values, normally in the
central location.
• It is called measure of central tendency (or averages).
• This represents the first order of measures.
• Popular measures are:
1. Mean
2. Median
3. Mode

1. Mean
• Arithmetic average (or mean) is a measure of central tendency that represents
the 'center' of the dataset.
• This is the commonest measure used in our daily conversation such as:
o Average income
o Average traffic
• It can be found by adding all the data and dividing the sum by the number of
observations.
Formula:
Module 1
\bar{x}=\frac{x_1+x_2+...+x_N}{N}=\frac{1}{N}\sum_{i=1}^{N}x_i
Example
For three numbers:
[
10,20,30
]
[
\frac{10+20+30}{3}
]
[
\frac{60}{3}
]
[
=20
]
Weighted Mean
• Unlike arithmetic mean that gives the weightage of all items equally, weighted
mean gives different importance to all items as the item importance varies.
• Hence, different weightage can be given to items.
Geometric Mean
• Geometric mean is the Nth root of the product of N items.
Formula:
Geometric\ mean=\left(\prod_{i=1}^{N}x_i\right)^{\frac{1}{N}}
Example
If the values are:
[
6,8
]
[
\sqrt{6\times8}
]
[
Module 1
\sqrt{48}
]

• The problem of mean is its extreme sensitiveness to noise.


• Even small changes in the input affect the mean drastically.

2. Median
• The middle value in the distribution is called median.
• If the total number of items in the distribution is odd, then the middle value is
called median.
• If the numbers are even, then the average value of two items in the centre is
the median.
• The median is the value where (x_i) is divided into two equal halves, with half
of the values being lower than the median and half higher than the median.
• A median class is that class where ((N/2)^{th}) item is present.
Formula for continuous case:
Median=L_1+\frac{\frac{N}{2}-cf}{f}\times i
Where:
• (i) = class interval of the median class
• (L_1) = lower limit of median class
• (f) = frequency of median class
• (cf) = cumulative frequency of all classes preceding median

3. Mode
• Mode is the value that occurs more frequently in the dataset.
• In other words, the value that has the highest frequency is called mode.
• Mode is only for discrete data and is not applicable for continuous data as
there are no repeated values in continuous data.
Module 1
• The procedure for finding mode is to calculate the frequencies for all the
values in the data, and mode is the value (or values) with the highest
frequency.
• Normally, the dataset is classified as:
o Unimodal → with modes 1
o Bimodal → with modes 2
o Trimodal → with modes 3

Source: Uploaded Machine Learning Textbook


11)Are Classification and Clustering the same or different?
Classification and Clustering are different.
Classification Clustering
Cluster analysis is an unsupervised
Classification is a supervised learning method.
learning method.
The program is supplied with
Classification algorithms use labelled dataset.
objects, but no labels are defined.
The algorithm itself observes the
The target attribute is called label or dependent
examples and recognizes patterns
variable.
based on grouping principles.
The relationship between input and target It aims to group objects into
variable is represented as a classification model. disjoint clusters or groups.
Clustering groups objects based on
Classification predicts predefined classes.
their attributes.
Examples: Decision Tree, Random Forest, Support
Examples: k-means algorithm,
Vector Machines, Naive Bayes, Artificial Neural
Hierarchical algorithms
Network and Deep Learning networks like CNN

Source: Uploaded Machine Learning Textbook


Module 1
12)Discuss the different ways to store and organize the data
• Once the dataset is assembled, it must be stored in a structure that is suitable
for data analysis.
• The goal of data storage management is to make data available for analysis.
• There are different approaches to organize and manage data in storage files
and systems from flat file to data warehouses.
• Some of them are listed below:

1. Flat Files
• These are the simplest and most commonly available data source.
• It is also the cheapest way of organizing the data.
• These flat files are the files where data is stored in plain ASCII or EBCDIC
format.
• Minor changes of data in flat files affect the results of the data mining
algorithms.
• Hence, flat file is suitable only for storing small dataset and not desirable if the
dataset becomes larger.
Popular spreadsheet formats:
CSV files
• CSV stands for comma-separated value files where the values are separated by
commas.
• These are used by spreadsheet and database applications.
• The first row may have attributes and the rest of the rows represent the data.
TSV files
• TSV stands for Tab separated values files where values are separated by Tab.
• Both CSV and TSV files are generic in nature and can be shared.
• There are many tools like Google Sheets and Microsoft Excel to process these
files.

2. Database System
Module 1
• It normally consists of database files and a database management system
(DBMS).
• Database files contain original data and metadata.
• DBMS aims to manage data and improve operator performance by including
various tools like:
o Database administrator
o Query processing
o Transaction manager
• A relational database consists of sets of tables.
• The tables have rows and columns.
• The columns represent the attributes and rows represent tuples.
• A tuple corresponds to either an object or a relationship between objects.
• A user can access and manipulate the data in the database using SQL.
Different types of databases:
Transactional database
• A transactional database is a collection of transactional records.
• Each record is a transaction.
• A transaction may have:
o Time stamp
o Identifier
o Set of items
• Transactional databases are created for performing associational analysis that
indicates the correlation among the items.
Time-series database
• Stores time related information like log files where data is associated with a
time stamp.
• This data represents the sequences of data.
• Example:
o Hourly
Module 1
o Weekly
o Yearly events
• Observing sales of product continuously may yield a time-series data.
Spatial database
• Spatial databases contain spatial information in a raster or vector format.
• Raster formats are either bitmaps or pixel maps.
• Images can be stored as raster data.
• Vector format can be used to store maps using geometric primitives like:
o Points
o Lines
o Polygons

3. World Wide Web (WWW)


• It provides a diverse, worldwide online information source.
• The objective of data mining algorithms is to mine interesting patterns of
information present in WWW.

4. XML (Extensible Markup Language)


• It is both human and machine interpretable data format that can be used to
represent data that needs to be shared across platforms.

5. Data Stream
• It is dynamic data, which flows in and out of the observing environment.
• Typical characteristics of data stream are:
o Huge volume of data
o Dynamic
o Fixed order movement
o Real-time constraints
Module 1
6. RSS (Really Simple Syndication)
• It is a format for sharing instant feeds across services.

7. JSON (JavaScript Object Notation)


• It is another useful data interchange format that is often used for many
machine learning algorithms.

You might also like