1
23-03-2021
Module I
2
Data
Data is a raw and unorganized fact that
required to be processed to make it
meaningful.
23-03-2021
3
Data is a collection of text, numbers and
symbols with no meaning. Data therefore
has to be processed, or provided with a
context, before it can have meaning
23-03-2021
4
Data and Information
23-03-2021
5
Information
► Information is the result of processing data,
usually by computer. This results in facts,
which enables the processed data to be used in
context and have meaning.
Information is data that has meaning
23-03-2021
6
Knowledge
► Knowledge is produced as a result of
understanding information that has been given
to us,
Information + application or use = Knowledge
23-03-2021
7
Data Mining
► Data mining is one of the most useful
techniques that help entrepreneurs,
researchers, and individuals to extract valuable
information from huge sets of data.
► Data mining is also called Knowledge
Discovery in Database (KDD).
23-03-2021
8
Why Data Mining?
► We live in a world where vast amounts of data
are collected daily. Analyzing such data is an
important need.
Data mining turns a large collection of data into knowledge.
23-03-2021
9
What is Data mining?
► The process of extracting information to
identify patterns, trends, and useful data that
would allow the business to take the data-
driven decision from huge sets of data is
called Data Mining.
► Many people treat data mining as a synonym
for another popularly used term,knowledge
discovery from data, or KDD, while others
view data mining as merely an essential step
in the process of knowledge discovery.
23-03-2021
10
Knowledge discovery from data, or KDD
► Knowledge discovery process is as an iterative
sequence of the following steps:
► 1. Data cleaning (to remove noise and inconsistent
data)
► 2. Data integration (where multiple data sources
may be combined)
► 3. Data selection (where data relevant to the
analysis task are retrieved from the database)
► 4. Data transformation (where data are
transformed and consolidated into forms
appropriate for mining by performing summary or
aggregation operations)
23-03-2021
11
► 5. Data mining (an essential process where
intelligent methods are applied to extract data
patterns)
► 6. Pattern evaluation (to identify the truly
interesting patterns representing knowledge
based on interestingness measure)
► [Link] presentation (where
visualization and knowledge representation
techniques are used to present mined
knowledge to users)
23-03-2021
12
Data mining stages or KDD steps
► Data mining is the process of discovering
interesting patterns and knowledge from large
amounts of data.
► The data sources can include databases, data
warehouses, theWeb, other information
repositories, or data that are streamed into the
system dynamically.
23-03-2021
13
What Kinds of Data Can Be Mined?
► As a general technology, data mining can be ► Database Data
applied to any kind of data as long as the
data are meaningful for a target application. ► A database system, also called a database
management system (DBMS), consists of
► The most basic forms of data for mining a collection of interrelated data, known as a
applications are database, and a set of software programs to
manage and access the data.
► Database data
► Data warehouse data ► The software programs provide mechanisms
for defining database structures and data
► Transactional data storage; for specifying and managing
concurrent, shared, or distributed data
access; and for ensuring consistency and
security of the information stored despite
system crashes or attempts at unauthorized
access.
23-03-2021
14
Database Data
► A relational database is a collection of
tables, each of which is assigned a unique
name. Each table consists of a set of
attributes (columns or fields) and usually
stores a large set of tuples (records or rows).
► Each tuple in a relational table represents an
object identified by a unique key and described
by a set of attribute values.
► A semantic data model, such as an entity-
relationship (ER) data model, is often
constructed for relational databases.
► An ER data model represents the database as
a set of entities and their relationships.
23-03-2021
15
Example
► Relational data can be accessed by database
queries written in a relational query language
(e.g., SQL) or with the assistance of graphical
user interfaces.
► A given query is transformed into a set of
relational operations, such as join, selection,
and projection, and is then optimized for
efficient processing.
23-03-2021
16
Mining of Relational Database
► When mining relational databases, we can ► Data mining systems may also detect
go further by searching for trends or data deviations—that is, items with sales that are
patterns. far from those expected in comparison with
the previous year. Such deviations can then be
► For example, data mining systems can
further investigated.
analyze customer data to predict the credit risk
of new customers based on their income, age, ► For example, data mining may discover that
and previous credit information. there has been a change in packaging of an
item or a significant increase in price.
23-03-2021
17
Data Warehouses
► Suppose that AllElectronics is a successful ► If AllElectronics had a data warehouse, this
international company with branches around task would be easy.
the world.
► A data warehouse is a repository of
► Each branch has its own set of databases. information collected from multiple sources,
stored under a unified schema, and usually
► The president of AllElectronics has asked you
residing at a single site.
to provide an analysis of the company’s sales
per item type per branch for the third quarter. ► Data warehouses are constructed via a process
This is a difficult task, particularly since the of data cleaning, data integration, data
relevant data are spread out over several transformation, data loading, and periodic data
databases physically located at numerous sites. refreshing.
23-03-2021
18
Data Warehouses
► To facilitate decision making, the data in a
data warehouse are organized around major
subjects (e.g., customer, item, supplier, and
activity).
► The data are stored to provide information
from a historical perspective, such as in the
past 6 to 12 months, and are typically
summarized.
► For example, rather than storing the details of
each sales transaction, the data warehouse may
store a summary of the transactions per
itemtype for each store or, summarized to a
higher level, for each sales region.
23-03-2021
19
Data Cube
► A data warehouse is usually modeled by a
multidimensional data structure, called a data
cube, in which each dimension corresponds to
an attribute or a set of attributes in the schema,
and each cell stores the value of some
aggregate measure such as count or [Link]
amount/.
► A data cube provides a multidimensional
view of data and allows the precomputation
and fast access of summarized data.
23-03-2021
20
Example of Data Cube
23-03-2021
21
3-Dimensional Cuboids
23-03-2021
22
Transactional Data
► In general, each record in a transactional ► A transactional database may have additional
database captures a transaction, such as a tables, which contain other information related
customer’s purchase, a flight booking, or a to the transactions, such as item description,
user’s clicks on a web page. information about the salesperson or the
branch, and so on.
► A transaction typically includes a unique
transaction identity number (trans ID) and a
list of the items making up the transaction,
such as the items purchased in the transaction.
23-03-2021
23
Transactional Data
► The transactional database is usually either ► For example, given the knowledge that
stored in a flat file in a format similar to the printers are commonly purchased together
table in Figure with computers, you could offer certain
printers at a steep discount (or even for free) to
customers buying selected computers, in the
hopes of selling more computers (which are
often more expensive than printers).
► A traditional database system is not able to
perform market basket data analysis.
► Which items sold well together?”
► Fortunately, data mining on transactional data
► This kind of market basket data analysis can do so by mining frequent itemsets,
would enable you to bundle groups of items
together as a strategy for boosting sales.
23-03-2021
24
Other kinds of data
► Time-related or sequence data (e.g., historical ► Hypertext and multimedia data (including text,
records, stock exchange data, and time-series image, video, and audio data)
and biological sequence data),
► Graph and networked data (e.g., social and
► Data streams (e.g., video surveillance and information networks),
sensor data, which are continuously
► Web (a huge, widely distributed information
transmitted)
repository made available by the Internet).
► Spatial data (e.g., maps), engineering design
data (e.g., the design of buildings, system
components, or integrated circuits)
23-03-2021
25
Data mining Models
23-03-2021
26
Predictive model and Descriptive model
23-03-2021
27
Classification
23-03-2021
28
Regression
► Regression is used to map a data item to a
real valued prediction variable.
► Regression involves the learning of the
function that does this mapping.
► Regression assumes that the target data fit
into some known type of function (e.g.,
linear, logistic, etc.) and then determines
the best function of this type that models
the given data.
► Some type of error analysis is used to
determine which function is "best."
23-03-2021
29
Time Series Analysis
► The value of an attribute is examined as it varies
over time.
► The values usually are obtained as evenly spaced
time points (daily, weekly, hourly, etc.).
► A time series plot , is used to visualize the time
series. There are three basic functions performed
in time series analysis:
► distance measures are used to determine the
similarity between different time series.
► the structure of the line is examined to
determine its behavior.
► use the historical time series plot to predict
future values.
23-03-2021
30
Prediction
► Many real-world data mining applications
can be seen as predicting future data
states based on past and current data.
► Prediction can be viewed as a type of
classification.
► Prediction is predicting a future state rather
than a current state.
► Prediction applications include flooding,
speech recognition, machine learning, and
pattern recognition.
23-03-2021
31
Clustering
► Similar to classification except that the groups ► The clustering is usually accomplished by
are not predefined, but rather defined by the determining the similarity among the data on
data alone. predefined attributes.
► unsupervised learning or segmentation. ► The most similar data are grouped into
clusters.
► It can be thought of as partitioning or
segmenting the data into groups that might or
might not be disjointed.
23-03-2021
32
Summarization
► Summarization maps data into subsets
with associated simple descriptions.
► also called characterization or
generalization.
► It extracts or derives representative
information about the database.
► This may be accomplished by actually
retrieving portions of the data.
► summary type information (such as the
mean of some numeric attribute) can be
derived from the data.
► The summarization characterizes the
contents of the database
23-03-2021
33
Association Rules
► Link analysis, alternatively referred to as
affinity analysis or association, refers to the
data mining task of uncovering relationships
among data.
► An association rule is a model that identifies
specific types of data associations.
► These associations are often used in the retail
sales community to identify items that are
frequently purchased together.
► Associations are also used in many other
applications such as predicting the failure of
telecommunication switches.
23-03-2021
34
Sequential analysis or sequence discovery
► Sequential analysis or sequence discovery is ► Unlike a market basket analysis, which
used to determine sequential patterns in data. requires the items to be purchased at the same
time, in sequence discovery the items are
► These patterns are based on a time sequence of
purchased over time in some order.
actions.
► These patterns are similar to associations in
that data (or events) are found to be related,
but the relationship is based on time.
23-03-2021
35
Data mining applications
1. Classification
Eg: In loan database, to classify an applicant as a prospective or defaulter , given his
various personal and demographic features along with previous purchase
characteristics.
2. Estimation
Predict the attribute of a data instance. Eg: estimate the percentage of marks of a
student , whose previous marks are already known.
3. Prediction
Predictive model predicts a future outcome rather than the current behaviour. Eg:
Predict next week’s closing price for the Google share price per unit.
23-03-2021
36
Data mining applications
4. Market basket analysis(association rule mining)
Analyses hidden rules called association rule in a large transactional database.
{pen, pencil-> book} – whenever pen and pencil are purchased together, book is also
purchased.
5. Clustering
Classification into different classes based on some similarities but the target classes are
unknown.
Areas where data mining is applied:
Web mining
Business intelligence Text mining
Business data analytics Social network data analysis
Bioinformatics
23-03-2021
37
Applications of Data mining
► Business intelligence
► Search engines.
23-03-2021
38
Business Intelligence
► It is critical for businesses to acquire a better
understanding of the commercial context of
their organization, such as their customers, the
market, supply and resources, and
competitors.
► Business intelligence (BI) technologies
provide historical, current, and predictive
views of business operations.
► Examples include reporting, online analytical
processing, business performance
management, competitive intelligence,
benchmarking, and predictive analytics.
23-03-2021
39
Business Intelligence
► How important is business intelligence?”
► Without data mining, many businesses may
not be able to perform effective market
analysis, compare customer feedback on
similar products, discover the strengths and
weaknesses of their competitors, retain
highly valuable customers, and make smart
business decisions.
23-03-2021
40
Web Search Engines
► A Web search engine is a specialized computer server
that searches for information on the Web.
► The search results of a user query are often returned as
a list (sometimes called hits).
► The hits may consist of web pages, images, and other
types of files.
► Some search engines also search and return data
available in public databases or open directories.
► Search engines differ from web directories in that web
directories are maintained by human editors whereas
search engines operate algorithmically or by a mixture
of
► algorithmic and human input.
23-03-2021
41
Web Search Engines
► Web search engines are essentially very large ► searching (e.g., deciding how pages should be
data mining applications. ranked, which advertisements should be
added, and how the search results can be
► Various data mining techniques are used in all
personalized or made “context aware”).
aspects of search engines, ranging from
► crawling (e.g., deciding which pages should
be crawled and the crawling frequencies),
► Indexing (e.g., selecting pages to be indexed
and deciding to which extent the index should
be constructed),
23-03-2021
42
What Kinds of Patterns Can Be Mined?
► There are a number of data mining ► Data mining functionalities are used to specify
functionalities. These include the kinds of patterns to be found in data
mining tasks.
► Characterization and discrimination
► In general, such tasks can be classified into
► The mining of frequent patterns, two categories: descriptive and predictive.
associations, and correlations
► Descriptive mining tasks characterize
► classification and regression properties of the data in a target data set.
► clustering analysis ► Predictive mining tasks perform induction on
the current data in order to make predictions.
► outlier analysis
23-03-2021
43
Class/Concept Description:
Characterization and Discrimination
► Class/Concept refers to the data to be ► Data Characterization − This refers to
associated with the classes or concepts. summarizing data of class under study. This
For example, in a company, the classes of class under study is called as Target Class.
items for sales include computer and ► Data Discrimination − It refers to the
printers, and concepts of customers mapping or classification of a class with some
include big spenders and budget spenders. predefined group or class.(by comparison of
Such descriptions of a class or a concept the target class with one or a set of
are called class/concept descriptions. comparative classes)
These descriptions can be derived by the
following two ways −
23-03-2021
44
Data Characterization
► The output of data characterization can be
presented in various forms.
► Examples include pie charts, bar charts,
curves,multidimensional data cubes, and
multidimensional tables, including crosstabs.
► The resulting descriptions can also be
presented as generalized relations or in rule
form
23-03-2021
45
Data Discrimination
► It is a comparison of the general features of
the target class data objects against the general
features of objects from one or multiple
contrasting classes.
23-03-2021
46
Mining Frequent Patterns, Associations, and
Correlations
► Frequent patterns are those patterns that occur ► Frequent Sub Structure − Substructure
frequently in data. refers to different structural forms, such as
graphs, trees, or lattices, which may be
► Frequent Item Set − It refers to a set of items
combined with item-sets or subsequences.
that frequently appear together, for example,
milk and bread.
► Frequent Subsequence − A sequence of
patterns that occur frequently such as
purchasing a camera is followed by memory
card.
23-03-2021
47
Association analysis
► Suppose that, as a marketing manager at ► A confidence, or certainty, of 50% means that
AllElectronics, you want to know which items if a customer buys a computer, there is a 50%
are frequently purchased together (i.e., within chance that she will buy software as well.
the same transaction).
► A 1% support means that 1% of all the
► An example of such a rule, mined from the transactions under analysis show that
AllElectronics transactional database, is computer and software are purchased together.
► buys.(X, “computer”)=>buys.(X, “software”)
[support = 1%, confidence = 50%],
► where X is a variable representing a customer.
23-03-2021
48
► Typically, association rules are discarded as
uninteresting if they do not satisfy both a
minimum support threshold and a
minimum confidence threshold.
► Frequent itemset mining is a fundamental
form of frequent pattern mining.
23-03-2021
49
Classification and Regression for Predictive
Analysis
► Classification is the process of finding a model ► The derived model can be presented in the
that describes and distinguishes the data following forms −
classes or concepts.
► Classification (IF-THEN) Rules
► The model are derived based on the analysis ► Decision Trees
of a set of training data
► Mathematical Formulae
► The purpose is to be able to use this model to
► Neural Networks
predict the class of objects whose class label is
unknown.
23-03-2021
50
23-03-2021
51
Cluster Analysis
► Unlike classification and regression, which
analyze class-labeled (training) data sets,
clustering analyzes data objects without
consulting class labels.
► In many cases, class labeled data may simply not
exist at the beginning. Clustering can be used to
generate class labels for a group of data.
► The objects are clustered or grouped based on
the principle of maximizing the intraclass
similarity and minimizing the interclass
similarity.
► That is,clusters of objects are formed so that
objects within a cluster have high similarity in
comparison to one another, but are rather
dissimilar to objects in other clusters.
23-03-2021
52
Outlier Analysis
► Outliers may be defined as the data objects
that do not comply with the general behavior
or model of the data available.
► These data objects are outliers. Many data
mining methods discard outliers as noise or
exceptions. However, in some applications
(e.g., fraud detection) the rare events can be
more interesting than the more regularly
occurring ones.
► The analysis of outlier data is referred to as
outlier analysis or anomaly mining.
23-03-2021
53
What Technology Are Used?
23-03-2021
54
Major Issues in Data Mining
► Mining Methodology
► User Interaction
► Mining various and new kinds of knowledge
► Mining knowledge in multi-dimensional space ► Interactive mining
► Data mining: An interdisciplinary effort ► Incorporation of background
► Boosting the power of discovery in a knowledge
networked environment
► Presentation and visualization of data
► Handling noise, uncertainty, and mining results
incompleteness of data
► Pattern evaluation and pattern- or constraint-
guided mining
23-03-2021
55
Major Issues in Data Mining
► Efficiency and Scalability ► Data mining and society
► Efficiency and scalability of data ► Social impacts of data mining
mining algorithms
► Privacy-preserving data mining
► Parallel, distributed, stream, and
► Invisible data mining
incremental mining methods
► Diversity of data types
► Handling complex types of data
► Mining dynamic, networked, and global
data repositories
23-03-2021