SlideShare a Scribd company logo
UNIT-ii
Data Preprocessing
Content
**********************************************
๏ถ Why preprocess the data?
๏ถ Data cleaning
๏ถ Data integration and transformation
๏ถ Data reduction
๏ถ Discretization and concept
hierarchgeneration
Why preprocess the data?
Why Data Preprocessing?
โ€ข Data in the real world is:
โ€“ incomplete: lacking attribute values, lacking
certain attributes of interest, or containing only
aggregate data
โ€“ noisy: containing errors or outliers
โ€“ inconsistent: containing discrepancies in codes or
names

โ€ข No quality data, no quality mining results!
โ€“ Quality decisions must be based on quality data
โ€“ Data warehouse needs consistent integration of
quality data
Multi-Dimensional Measure of Data
Quality
โ€ข A well-accepted multidimensional view:
โ€“
โ€“
โ€“
โ€“
โ€“
โ€“
โ€“
โ€“

Accuracy
Completeness
Consistency
Timeliness
Believability
Value added
Interpretability
Accessibility

โ€ข Broad categories:

โ€“ intrinsic, contextual, representational, and
accessibility.
Major Tasks in Data Preprocessing
โ€ข Data cleaning
โ€“ Fill in missing values, smooth noisy data, identify or remove
outliers, and resolve inconsistencies

โ€ข Data integration
โ€“ Integration of multiple databases, data cubes, or files

โ€ข Data transformation
โ€“ Normalization and aggregation

โ€ข Data reduction
โ€“ Obtains reduced representation in volume but produces the
same or similar analytical results

โ€ข Data discretization
โ€“ Part of data reduction but with particular importance,
especially for numerical data
Forms of data
preprocessing
Data cleaning
Data Cleaning
โ€ข Data cleaning tasks
โ€“ Fill in missing values
โ€“ Identify outliers and smooth out noisy
data
โ€“ Correct inconsistent data
Missing
Data
โ€ข Data is not always available
โ€“ E.g., many tuples have no recorded value for several
attributes, such as customer income in sales data

โ€ข Missing data may be due to
โ€“ equipment malfunction
โ€“ inconsistent with other recorded data and thus deleted
โ€“ data not entered due to misunderstanding
โ€“ certain data may not be considered important at the time
of entry
โ€“ not register history or changes of the data

โ€ข Missing data may need to be inferred.
How to Handle Missing Data?
โ€ข Ignore the tuple: usually done when class label
is missing
โ€ข Fill in the missing value manually
โ€ข Use a global constant to fill in the missing
value: ex. โ€œunknownโ€
How to Handle Missing
Data?
โ€ข Use the attribute mean to fill in the missing value
โ€ข Use the attribute mean for all samples belonging
to the same class to fill in the missing value
โ€ข Use the most probable value to fill in the missing
value: inference-based such as Bayesian formula
or decision tree
Noisy
Data

โ€ข Noise: random error or variance in a measured
variable
โ€ข Incorrect attribute values may due to
โ€“
โ€“
โ€“
โ€“
โ€“

faulty data collection instruments
data entry problems
data transmission problems
technology limitation
inconsistency in naming convention

โ€ข Other data problems which requires data
cleaning
โ€“ duplicate records
โ€“ incomplete data
โ€“ inconsistent data
How to Handle Noisy Data?
โ€ข Binning method:
โ€“ first sort data and partition into (equalfrequency) bins
โ€“ then one can smooth by bin means, smooth
by bin median, smooth by bin boundaries

โ€ข Clustering
โ€“ detect and remove outliers

โ€ข Regression
โ€“ smooth by fitting the data to a regression
functions โ€“ linear regression
Cluster
Analysis
Data integration and
transformation
Data Integration
โ€ข Data integration:

โ€“ combines data from multiple sources into a coherent
store

โ€ข Schema integration

โ€“ integrate metadata from different sources
โ€“ Entity identification problem: identify real world
entities from multiple data sources, e.g., A.cust-id โ‰ก
B.cust-#

โ€ข Detecting and resolving data value conflicts

โ€“ for the same real world entity, attribute values from
different sources are different
โ€“ possible reasons: different representations,
different scales, e.g., metric vs. British units
Handling Redundant Data in Data
Integration
โ€ข Redundant data occur often when
integration of multiple databases
โ€“ The same attribute may have different
names in different databases
โ€“ One attribute may be a โ€œderivedโ€ attribute
in another table, e.g., annual revenue
Handling Redundant Data in
Data Integration
โ€ข Redundant data may be able to be
detected by correlation analysis
โ€ข Careful integration of the data from
multiple sources may help
reduce/avoid redundancies and
inconsistencies and improve mining
speed and quality
Data Transformation
โ€ข Smoothing: remove noise from data
โ€ข Aggregation: summarization, data cube
construction
โ€ข Generalization: concept hierarchy climbing
Data Transformation
โ€ข Normalization: scaled to fall within a small,
specified range
โ€“ min-max normalization
โ€“ z-score normalization
โ€“ normalization by decimal scaling

โ€ข Attribute/feature construction
โ€“ New attributes constructed from the given
ones
Data Transformation:
Normalization
โ€ข min-max normalization
v โˆ’ min
v' =
(new _ max โˆ’ new _ min ) + new _ min
max โˆ’ min
A

A

A

A

A

โ€ข z-score normalization
v โˆ’mean
v' =
stand _ dev
A

A

v
โ€ข normalization by decimal scaling
v' =

10

j

Where j is the smallest integer such that Max(| v ' |)<1

A
Data reduction
Data Reduction
โ€ข Warehouse may store terabytes of data:
Complex data analysis/mining may take a
very long time to run on the complete data
set
โ€ข 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
Example of Decision Tree Induction
Initial attribute set:
{A1, A2, A3, A4, A5, A6}
A4 ?
A6?

A1?

Class 1
>

Class 2

Class 1

Reduced attribute set: {A1, A4, A6}

Class 2
Histograms

โ€ข A popular data
reduction technique
โ€ข Divide data into
buckets and store
average (sum) for
each bucket
โ€ข Can be constructed
optimally in one
dimension using
dynamic programming
โ€ข Related to
quantization

40
35
30
25
20
15
10
5
0

10000

30000

50000

70000

90000
Clustering
โ€ข Partition data set into clusters, and one can store
cluster representation only
โ€ข Can be very effective if data is clustered but not if
data is โ€œsmearedโ€
โ€ข Can have hierarchical clustering and be stored in
multi-dimensional index tree structures
โ€ข There are many choices of clustering definitions and
clustering algorithms.
Sampling
โ€ข Allows a large data set to be
represented by a much smaller of the
data.
โ€ข Let a large data set D, contains N tuples.
โ€ข Methods to reduce data set D:
โ€“ Simple random sample without replacement
(SRSWOR)
โ€“ Simple random sample with replacement
(SRSWR)
โ€“ Cluster sample
โ€“ Stright sample
Sampling

WOR ndom
SRS le ra
t
simp e withou
(
l
samp ment)
e
eplac
r

SRSW
R

Raw Data
Lecture-16 - Data reduction
Sampling
Raw Data

Cluster/Stratified Sample

Lecture-16 - Data reduction
Discretization and concept
hierarchy generation
Discretization

โ€ข Three types of attributes:

โ€“ Nominal โ€” values from an unordered set
โ€“ Ordinal โ€” values from an ordered set
โ€“ Continuous โ€” real numbers

โ€ข Discretization: divide the range of a
continuous attribute into intervals
โ€“ Some classification algorithms only accept
categorical attributes.
โ€“ Reduce data size by discretization
โ€“ Prepare for further analysis
Discretization and Concept
hierachy
โ€ข Discretization
โ€“ reduce the number of values for a given
continuous attribute by dividing the range of the
attribute into intervals. Interval labels can then
be used to replace actual data values.

โ€ข Concept hierarchies
โ€“ reduce the data by collecting and replacing low
level concepts (such as numeric values for the
attribute age) by higher level concepts (such as
young, middle-aged, or senior).
Discretization
reduce the number of values for a given
continuous attribute by dividing the
range of the attribute into intervals.
Some classification algorithms only
accept categorical attributes.
Reduce data size by discretization
Prepare for further analysis
Specification of a set of
attributes
Concept hierarchy can be automatically
generated based on the number of
distinct values per attribute in the given
attribute set. The attribute with the
most distinct values is placed at the
lowestcountry of the hierarchy.
level
15 distinct values
province_or_ state
city
street

65 distinct
values
3567 distinct values
674,339 distinct values
Thank you !!

More Related Content

What's hot

Data preprocessing ng
Data preprocessing   ngData preprocessing   ng
Data preprocessing ng
datapreprocessing
ย 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning
Gopal Sakarkar
ย 
Data Preprocessing || Data Mining
Data Preprocessing || Data MiningData Preprocessing || Data Mining
Data Preprocessing || Data Mining
Iffat Firozy
ย 
Data pre processing
Data pre processingData pre processing
Data pre processing
junnubabu
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
dineshbabuspr
ย 
Data preprocess
Data preprocessData preprocess
Data preprocess
srigiridharan92
ย 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
dineshbabuspr
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
kayathri02
ย 
data warehousing & minining 1st unit
data warehousing & minining 1st unitdata warehousing & minining 1st unit
data warehousing & minining 1st unit
bhagathk
ย 
Data PreProcessing
Data PreProcessingData PreProcessing
Data PreProcessing
tdharmaputhiran
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ksamyMCA
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
Vikran Kottaisamy
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
Gajanand Sharma
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
Harry Potter
ย 
03 preprocessing
03 preprocessing03 preprocessing
03 preprocessing
purnimatm
ย 
1.6.data preprocessing
1.6.data preprocessing1.6.data preprocessing
1.6.data preprocessing
Krish_ver2
ย 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
Object-Frontier Software Pvt. Ltd
ย 

What's hot (17)

Data preprocessing ng
Data preprocessing   ngData preprocessing   ng
Data preprocessing ng
ย 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning
ย 
Data Preprocessing || Data Mining
Data Preprocessing || Data MiningData Preprocessing || Data Mining
Data Preprocessing || Data Mining
ย 
Data pre processing
Data pre processingData pre processing
Data pre processing
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ย 
Data preprocess
Data preprocessData preprocess
Data preprocess
ย 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ย 
data warehousing & minining 1st unit
data warehousing & minining 1st unitdata warehousing & minining 1st unit
data warehousing & minining 1st unit
ย 
Data PreProcessing
Data PreProcessingData PreProcessing
Data PreProcessing
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ย 
03 preprocessing
03 preprocessing03 preprocessing
03 preprocessing
ย 
1.6.data preprocessing
1.6.data preprocessing1.6.data preprocessing
1.6.data preprocessing
ย 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
ย 

Viewers also liked

Seminar Association Rules
Seminar Association RulesSeminar Association Rules
Seminar Association Rules
alrazgi
ย 
Associative Learning
Associative LearningAssociative Learning
Associative Learning
Indrajit Sreemany
ย 
Preprocess
PreprocessPreprocess
Preprocess
sharmilajohn
ย 
Data mining-primitives-languages-and-system-architectures2641
Data mining-primitives-languages-and-system-architectures2641Data mining-primitives-languages-and-system-architectures2641
Data mining-primitives-languages-and-system-architectures2641
Aiswaryadevi Jaganmohan
ย 
Apriori
AprioriApriori
Apriori
Khaled Boussaidi
ย 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
Mainul Hassan
ย 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
Junghoon Kim
ย 
Clustering
ClusteringClustering
Clustering
Meme Hei
ย 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
nouraalkhatib
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ankur bhalla
ย 
Lecture13 - Association Rules
Lecture13 - Association RulesLecture13 - Association Rules
Lecture13 - Association Rules
Albert Orriols-Puig
ย 
Decision trees
Decision treesDecision trees
Decision trees
Jagjit Wilku
ย 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
DataminingTools Inc
ย 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
Ashis Kumar Chanda
ย 
Data Mining: Association Rules Basics
Data Mining: Association Rules BasicsData Mining: Association Rules Basics
Data Mining: Association Rules Basics
Benazir Income Support Program (BISP)
ย 
Cluster analysis
Cluster analysisCluster analysis
Cluster analysis
Jewel Refran
ย 
Clustering in Data Mining
Clustering in Data MiningClustering in Data Mining
Clustering in Data Mining
Archana Swaminathan
ย 
Data Mining: clustering and analysis
Data Mining: clustering and analysisData Mining: clustering and analysis
Data Mining: clustering and analysis
DataminingTools Inc
ย 
Data mining
Data miningData mining
Data mining
Akannsha Totewar
ย 

Viewers also liked (19)

Seminar Association Rules
Seminar Association RulesSeminar Association Rules
Seminar Association Rules
ย 
Associative Learning
Associative LearningAssociative Learning
Associative Learning
ย 
Preprocess
PreprocessPreprocess
Preprocess
ย 
Data mining-primitives-languages-and-system-architectures2641
Data mining-primitives-languages-and-system-architectures2641Data mining-primitives-languages-and-system-architectures2641
Data mining-primitives-languages-and-system-architectures2641
ย 
Apriori
AprioriApriori
Apriori
ย 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
ย 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
ย 
Clustering
ClusteringClustering
Clustering
ย 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ย 
Lecture13 - Association Rules
Lecture13 - Association RulesLecture13 - Association Rules
Lecture13 - Association Rules
ย 
Decision trees
Decision treesDecision trees
Decision trees
ย 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
ย 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
ย 
Data Mining: Association Rules Basics
Data Mining: Association Rules BasicsData Mining: Association Rules Basics
Data Mining: Association Rules Basics
ย 
Cluster analysis
Cluster analysisCluster analysis
Cluster analysis
ย 
Clustering in Data Mining
Clustering in Data MiningClustering in Data Mining
Clustering in Data Mining
ย 
Data Mining: clustering and analysis
Data Mining: clustering and analysisData Mining: clustering and analysis
Data Mining: clustering and analysis
ย 
Data mining
Data miningData mining
Data mining
ย 

Similar to Data preprocessing ppt1

Data extraction, cleanup &amp; transformation tools 29.1.16
Data extraction, cleanup &amp; transformation tools 29.1.16Data extraction, cleanup &amp; transformation tools 29.1.16
Data extraction, cleanup &amp; transformation tools 29.1.16
Dhilsath Fathima
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
Roshan575917
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
Arumugam Prakash
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
chatbot9
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
waseemchaudhry13
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
congtran88
ย 
Preprocessing
PreprocessingPreprocessing
Preprocessing
mmuthuraj
ย 
Pre-Processing and Data Preparation
Pre-Processing and Data PreparationPre-Processing and Data Preparation
Pre-Processing and Data Preparation
Umair Shafique
ย 
Data preprocessing 2
Data preprocessing 2Data preprocessing 2
Data preprocessing 2
extraganesh
ย 
Unit 3 part ii Data mining
Unit 3 part ii Data miningUnit 3 part ii Data mining
Unit 3 part ii Data mining
Dhilsath Fathima
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
extraganesh
ย 
Dmblog
DmblogDmblog
Data pre processing
Data pre processingData pre processing
Data pre processing
pommurajopt
ย 
data clean.ppt
data clean.pptdata clean.ppt
data clean.ppt
chatbot9
ย 
Data1
Data1Data1
Data1
suganmca14
ย 
Data1
Data1Data1
Data1
suganmca14
ย 
Datapreprocessing
DatapreprocessingDatapreprocessing
Datapreprocessing
priya_trehan
ย 
Data preprocessing in Data Mining
Data preprocessing in Data MiningData preprocessing in Data Mining
Data preprocessing in Data Mining
DHIVYADEVAKI
ย 
Data Preprocessing&tools
Data Preprocessing&toolsData Preprocessing&tools
Data Preprocessing&tools
Amandeep Gill
ย 
DATA preprocessing.pptx
DATA preprocessing.pptxDATA preprocessing.pptx
DATA preprocessing.pptx
Chandra Meena
ย 

Similar to Data preprocessing ppt1 (20)

Data extraction, cleanup &amp; transformation tools 29.1.16
Data extraction, cleanup &amp; transformation tools 29.1.16Data extraction, cleanup &amp; transformation tools 29.1.16
Data extraction, cleanup &amp; transformation tools 29.1.16
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
ย 
Preprocessing.ppt
Preprocessing.pptPreprocessing.ppt
Preprocessing.ppt
ย 
Preprocessing
PreprocessingPreprocessing
Preprocessing
ย 
Pre-Processing and Data Preparation
Pre-Processing and Data PreparationPre-Processing and Data Preparation
Pre-Processing and Data Preparation
ย 
Data preprocessing 2
Data preprocessing 2Data preprocessing 2
Data preprocessing 2
ย 
Unit 3 part ii Data mining
Unit 3 part ii Data miningUnit 3 part ii Data mining
Unit 3 part ii Data mining
ย 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
ย 
Dmblog
DmblogDmblog
Dmblog
ย 
Data pre processing
Data pre processingData pre processing
Data pre processing
ย 
data clean.ppt
data clean.pptdata clean.ppt
data clean.ppt
ย 
Data1
Data1Data1
Data1
ย 
Data1
Data1Data1
Data1
ย 
Datapreprocessing
DatapreprocessingDatapreprocessing
Datapreprocessing
ย 
Data preprocessing in Data Mining
Data preprocessing in Data MiningData preprocessing in Data Mining
Data preprocessing in Data Mining
ย 
Data Preprocessing&tools
Data Preprocessing&toolsData Preprocessing&tools
Data Preprocessing&tools
ย 
DATA preprocessing.pptx
DATA preprocessing.pptxDATA preprocessing.pptx
DATA preprocessing.pptx
ย 

Recently uploaded

How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
Celine George
ย 
Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.
IsmaelVazquez38
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
ย 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
ย 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
ย 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
ย 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
ย 
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
ย 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
ย 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
ย 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
heathfieldcps1
ย 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
ย 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
ย 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
ย 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
ย 
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 8 - Cแบข Nฤ‚M - FRIENDS PLUS - Nฤ‚M HแปŒC 2023-2024 (B...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 8 - Cแบข Nฤ‚M - FRIENDS PLUS - Nฤ‚M HแปŒC 2023-2024 (B...Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 8 - Cแบข Nฤ‚M - FRIENDS PLUS - Nฤ‚M HแปŒC 2023-2024 (B...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 8 - Cแบข Nฤ‚M - FRIENDS PLUS - Nฤ‚M HแปŒC 2023-2024 (B...
Nguyen Thanh Tu Collection
ย 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
ย 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
ย 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
ย 

Recently uploaded (20)

How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
ย 
Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
ย 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
ย 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
ย 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
ย 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
ย 
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
ย 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
ย 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
ย 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
ย 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
ย 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
ย 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
ย 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
ย 
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 8 - Cแบข Nฤ‚M - FRIENDS PLUS - Nฤ‚M HแปŒC 2023-2024 (B...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 8 - Cแบข Nฤ‚M - FRIENDS PLUS - Nฤ‚M HแปŒC 2023-2024 (B...Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 8 - Cแบข Nฤ‚M - FRIENDS PLUS - Nฤ‚M HแปŒC 2023-2024 (B...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 8 - Cแบข Nฤ‚M - FRIENDS PLUS - Nฤ‚M HแปŒC 2023-2024 (B...
ย 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
ย 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
ย 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
ย 

Data preprocessing ppt1

  • 1. UNIT-ii Data Preprocessing Content ********************************************** ๏ถ Why preprocess the data? ๏ถ Data cleaning ๏ถ Data integration and transformation ๏ถ Data reduction ๏ถ Discretization and concept hierarchgeneration
  • 3. Why Data Preprocessing? โ€ข Data in the real world is: โ€“ incomplete: lacking attribute values, lacking certain attributes of interest, or containing only aggregate data โ€“ noisy: containing errors or outliers โ€“ inconsistent: containing discrepancies in codes or names โ€ข No quality data, no quality mining results! โ€“ Quality decisions must be based on quality data โ€“ Data warehouse needs consistent integration of quality data
  • 4. Multi-Dimensional Measure of Data Quality โ€ข A well-accepted multidimensional view: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ Accuracy Completeness Consistency Timeliness Believability Value added Interpretability Accessibility โ€ข Broad categories: โ€“ intrinsic, contextual, representational, and accessibility.
  • 5. Major Tasks in Data Preprocessing โ€ข Data cleaning โ€“ Fill in missing values, smooth noisy data, identify or remove outliers, and resolve inconsistencies โ€ข Data integration โ€“ Integration of multiple databases, data cubes, or files โ€ข Data transformation โ€“ Normalization and aggregation โ€ข Data reduction โ€“ Obtains reduced representation in volume but produces the same or similar analytical results โ€ข Data discretization โ€“ Part of data reduction but with particular importance, especially for numerical data
  • 8. Data Cleaning โ€ข Data cleaning tasks โ€“ Fill in missing values โ€“ Identify outliers and smooth out noisy data โ€“ Correct inconsistent data
  • 9. Missing Data โ€ข Data is not always available โ€“ E.g., many tuples have no recorded value for several attributes, such as customer income in sales data โ€ข Missing data may be due to โ€“ equipment malfunction โ€“ inconsistent with other recorded data and thus deleted โ€“ data not entered due to misunderstanding โ€“ certain data may not be considered important at the time of entry โ€“ not register history or changes of the data โ€ข Missing data may need to be inferred.
  • 10. How to Handle Missing Data? โ€ข Ignore the tuple: usually done when class label is missing โ€ข Fill in the missing value manually โ€ข Use a global constant to fill in the missing value: ex. โ€œunknownโ€
  • 11. How to Handle Missing Data? โ€ข Use the attribute mean to fill in the missing value โ€ข Use the attribute mean for all samples belonging to the same class to fill in the missing value โ€ข Use the most probable value to fill in the missing value: inference-based such as Bayesian formula or decision tree
  • 12. Noisy Data โ€ข Noise: random error or variance in a measured variable โ€ข Incorrect attribute values may due to โ€“ โ€“ โ€“ โ€“ โ€“ faulty data collection instruments data entry problems data transmission problems technology limitation inconsistency in naming convention โ€ข Other data problems which requires data cleaning โ€“ duplicate records โ€“ incomplete data โ€“ inconsistent data
  • 13. How to Handle Noisy Data? โ€ข Binning method: โ€“ first sort data and partition into (equalfrequency) bins โ€“ then one can smooth by bin means, smooth by bin median, smooth by bin boundaries โ€ข Clustering โ€“ detect and remove outliers โ€ข Regression โ€“ smooth by fitting the data to a regression functions โ€“ linear regression
  • 16. Data Integration โ€ข Data integration: โ€“ combines data from multiple sources into a coherent store โ€ข Schema integration โ€“ integrate metadata from different sources โ€“ Entity identification problem: identify real world entities from multiple data sources, e.g., A.cust-id โ‰ก B.cust-# โ€ข Detecting and resolving data value conflicts โ€“ for the same real world entity, attribute values from different sources are different โ€“ possible reasons: different representations, different scales, e.g., metric vs. British units
  • 17. Handling Redundant Data in Data Integration โ€ข Redundant data occur often when integration of multiple databases โ€“ The same attribute may have different names in different databases โ€“ One attribute may be a โ€œderivedโ€ attribute in another table, e.g., annual revenue
  • 18. Handling Redundant Data in Data Integration โ€ข Redundant data may be able to be detected by correlation analysis โ€ข Careful integration of the data from multiple sources may help reduce/avoid redundancies and inconsistencies and improve mining speed and quality
  • 19. Data Transformation โ€ข Smoothing: remove noise from data โ€ข Aggregation: summarization, data cube construction โ€ข Generalization: concept hierarchy climbing
  • 20. Data Transformation โ€ข Normalization: scaled to fall within a small, specified range โ€“ min-max normalization โ€“ z-score normalization โ€“ normalization by decimal scaling โ€ข Attribute/feature construction โ€“ New attributes constructed from the given ones
  • 21. Data Transformation: Normalization โ€ข min-max normalization v โˆ’ min v' = (new _ max โˆ’ new _ min ) + new _ min max โˆ’ min A A A A A โ€ข z-score normalization v โˆ’mean v' = stand _ dev A A v โ€ข normalization by decimal scaling v' = 10 j Where j is the smallest integer such that Max(| v ' |)<1 A
  • 23. Data Reduction โ€ข Warehouse may store terabytes of data: Complex data analysis/mining may take a very long time to run on the complete data set โ€ข 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
  • 24. Example of Decision Tree Induction Initial attribute set: {A1, A2, A3, A4, A5, A6} A4 ? A6? A1? Class 1 > Class 2 Class 1 Reduced attribute set: {A1, A4, A6} Class 2
  • 25. Histograms โ€ข A popular data reduction technique โ€ข Divide data into buckets and store average (sum) for each bucket โ€ข Can be constructed optimally in one dimension using dynamic programming โ€ข Related to quantization 40 35 30 25 20 15 10 5 0 10000 30000 50000 70000 90000
  • 26. Clustering โ€ข Partition data set into clusters, and one can store cluster representation only โ€ข Can be very effective if data is clustered but not if data is โ€œsmearedโ€ โ€ข Can have hierarchical clustering and be stored in multi-dimensional index tree structures โ€ข There are many choices of clustering definitions and clustering algorithms.
  • 27. Sampling โ€ข Allows a large data set to be represented by a much smaller of the data. โ€ข Let a large data set D, contains N tuples. โ€ข Methods to reduce data set D: โ€“ Simple random sample without replacement (SRSWOR) โ€“ Simple random sample with replacement (SRSWR) โ€“ Cluster sample โ€“ Stright sample
  • 28. Sampling WOR ndom SRS le ra t simp e withou ( l samp ment) e eplac r SRSW R Raw Data Lecture-16 - Data reduction
  • 31. Discretization โ€ข Three types of attributes: โ€“ Nominal โ€” values from an unordered set โ€“ Ordinal โ€” values from an ordered set โ€“ Continuous โ€” real numbers โ€ข Discretization: divide the range of a continuous attribute into intervals โ€“ Some classification algorithms only accept categorical attributes. โ€“ Reduce data size by discretization โ€“ Prepare for further analysis
  • 32. Discretization and Concept hierachy โ€ข Discretization โ€“ reduce the number of values for a given continuous attribute by dividing the range of the attribute into intervals. Interval labels can then be used to replace actual data values. โ€ข Concept hierarchies โ€“ reduce the data by collecting and replacing low level concepts (such as numeric values for the attribute age) by higher level concepts (such as young, middle-aged, or senior).
  • 33. Discretization reduce the number of values for a given continuous attribute by dividing the range of the attribute into intervals. Some classification algorithms only accept categorical attributes. Reduce data size by discretization Prepare for further analysis
  • 34. Specification of a set of attributes Concept hierarchy can be automatically generated based on the number of distinct values per attribute in the given attribute set. The attribute with the most distinct values is placed at the lowestcountry of the hierarchy. level 15 distinct values province_or_ state city street 65 distinct values 3567 distinct values 674,339 distinct values