IT603(B) • Data Mining • Unit II

Data Preprocessing and Knowledge Discovery

Complete RGPV exam-oriented notes covering data cleaning, integration, transformation, reduction, discretization, concept hierarchy generation, data mining techniques, KDD process, applications and challenges.

Start Unit 2 Notes

1. Data Preprocessing 14 Marks

Data preprocessing is the process of converting incomplete, noisy, inconsistent and raw data into a clean and suitable form before applying data-mining algorithms.

Why Data Preprocessing is Required

  • Real-world data is often incomplete.
  • Different sources may use different formats.
  • Records may contain errors and duplicate values.
  • Large data may increase processing time.
  • Irrelevant attributes can reduce model accuracy.
  • Mining results depend strongly on data quality.

Main Steps

Raw Data | v Data Cleaning | v Data Integration | v Data Transformation | v Data Reduction | v Discretization | v Prepared Data for Mining

Objectives

  • Improve data accuracy and consistency.
  • Reduce the size of data.
  • Improve algorithm performance.
  • Produce meaningful and reliable patterns.
Conclusion: Data preprocessing is an essential step because poor-quality input generally produces poor-quality mining results.

2. Data Quality Problems 14 Marks

Incomplete Data

Some attribute values or complete records may be missing.

Noisy Data

Data may contain random errors, abnormal values or measurement errors.

Inconsistent Data

The same fact may be represented differently in different sources.

Example: A gender value may be stored as M, Male, 1 or Man in different databases.

Duplicate Data

The same entity may appear multiple times because of repeated entry or source integration.

Outdated Data

Old values may no longer represent the current real-world situation.

Data Quality Dimensions

  • Accuracy
  • Completeness
  • Consistency
  • Timeliness
  • Validity
  • Uniqueness

3. Data Cleaning 14 Marks

Data cleaning detects and corrects missing, noisy, inconsistent, invalid and duplicate data.

Major Tasks

  • Fill missing values.
  • Smooth noisy data.
  • Identify and remove outliers.
  • Resolve inconsistencies.
  • Remove duplicate records.
  • Validate formats and ranges.

General Cleaning Process

Data Profiling | Error Detection | Correction Rules | Standardization | Duplicate Removal | Validation

Benefits

  • Improves model accuracy.
  • Reduces misleading patterns.
  • Improves integration.
  • Reduces unnecessary processing.

4. Handling Missing Values 14 Marks

Methods

1. Ignore the Tuple

Delete the record containing the missing value. This is suitable when only a few records are affected.

2. Fill Manually

A user or expert enters the correct value. This is accurate but expensive for large datasets.

3. Use a Global Constant

Replace missing values with a value such as Unknown or Not Available.

4. Use Mean or Median

For numerical attributes, replace missing values with mean or median.

Values: 10, 12, ?, 16, 17 Mean of known values = 13.75 Missing value may be replaced by 13.75

5. Use Class-Specific Mean

Calculate the mean only within the same class or group.

6. Predict the Most Probable Value

Use regression, decision tree or another model to estimate the missing value.

Deleting too many records may lead to information loss and biased results.

5. Handling Noisy Data 14 Marks

Noise is a random error or unwanted variation in measured data.

Binning

Sorted data is divided into bins and values are smoothed using bin mean, median or boundaries.

Sorted values: 4, 8, 9 | 15, 21, 21 | 24, 25, 28 First bin mean = 7 Smoothed values = 7, 7, 7

Regression

A function is fitted to data and noisy values are adjusted according to the fitted relationship.

Clustering

Values outside normal clusters may be identified as outliers or errors.

Computer and Human Inspection

Automated detection is combined with expert review for important records.

6. Data Integration 14 Marks

Data integration combines data from multiple heterogeneous sources into a single consistent data store.

Major Issues

Schema Integration

Different database schemas must be matched and combined.

Entity Identification

The same entity may have different names or identifiers in different sources.

Source A: Customer_ID Source B: Client_Number Integrated: Customer_Key

Redundancy

The same attribute or derived information may appear in multiple sources.

Data Value Conflict

Sources may use different units, codes or date formats.

Example: Weight may be stored in kilograms in one source and pounds in another.

Correlation Analysis

Correlation can help identify redundant numerical attributes.

Advantages

  • Provides a unified data view.
  • Improves consistency.
  • Supports enterprise-wide analysis.

7. Data Transformation 14 Marks

Data transformation converts data into appropriate formats, structures or values for mining.

Methods

Smoothing

Removes noise using techniques such as binning and regression.

Aggregation

Combines detailed values into summaries.

Daily Sales → Monthly Sales → Yearly Sales

Generalization

Replaces low-level data with higher-level concepts.

Gwalior → Madhya Pradesh → India

Attribute Construction

Creates new attributes from existing attributes.

Total_Price = Quantity × Unit_Price

Normalization

Scales numerical attributes into a selected range.

8. Normalization Methods 14 Marks

Min-Max Normalization

Transforms a value into a specified range, commonly 0 to 1.

v' = (v - minA) / (maxA - minA)
If v = 50, min = 0 and max = 100: v' = 50 / 100 = 0.5

Z-Score Normalization

Uses the mean and standard deviation.

v' = (v - meanA) / standard_deviationA

Decimal Scaling

Moves the decimal point according to the maximum absolute value.

v' = v / 10^j

Why Normalize?

  • Prevents large-scale attributes from dominating.
  • Improves distance-based algorithms.
  • Speeds up model training.

9. Data Reduction 14 Marks

Data reduction creates a smaller representation of a dataset while preserving important analytical information.

Need

  • Reduce storage requirements.
  • Reduce mining time.
  • Improve visualization.
  • Remove irrelevant or redundant information.

Main Strategies

  • Data cube aggregation
  • Dimensionality reduction
  • Numerosity reduction
  • Data compression
  • Discretization and concept hierarchy
Large Dataset | Reduction Technique | Compact Representation | Similar Mining Result

10. Dimensionality Reduction 14 Marks

Dimensionality reduction decreases the number of attributes or features in a dataset.

Attribute Subset Selection

Selects only relevant attributes and removes redundant or irrelevant features.

Feature Extraction

Creates a smaller set of new features from the original attributes.

Principal Component Analysis

PCA transforms correlated variables into a smaller set of uncorrelated principal components.

Wavelet Transform

Transforms data into a compressed representation using wavelet coefficients.

Benefits

  • Reduces computation.
  • Reduces overfitting.
  • Improves visualization.
  • May improve model performance.

Curse of Dimensionality

As dimensions increase, data becomes sparse and distance measures may become less meaningful.

11. Numerosity Reduction 14 Marks

Numerosity reduction replaces large volumes of data with smaller models, summaries or representative samples.

Parametric Methods

  • Regression
  • Log-linear models

Non-Parametric Methods

  • Histograms
  • Clustering
  • Sampling
  • Data cube aggregation

Sampling Types

  • Simple random sampling
  • Sampling without replacement
  • Sampling with replacement
  • Stratified sampling
Instead of mining 10 million records, a representative sample of 100,000 records may be used for initial analysis.

12. Discretization 14 Marks

Discretization converts a continuous numerical attribute into a limited number of intervals or categories.

Example

Age values: 0–12 → Child 13–19 → Teenager 20–59 → Adult 60+ → Senior Citizen

Methods

Equal-Width Partitioning

The value range is divided into intervals of equal width.

Equal-Frequency Partitioning

Each interval contains approximately the same number of data values.

Histogram Analysis

Uses the distribution of values to define intervals.

Entropy-Based Discretization

Uses class information and information gain to choose split points.

Cluster-Based Discretization

Uses clusters to create natural value groups.

Advantages

  • Simplifies data.
  • Improves interpretability.
  • Supports concept hierarchy.
  • Can reduce noise.

13. Concept Hierarchy Generation 14 Marks

A concept hierarchy organizes low-level data values into higher levels of abstraction.

Example Hierarchies

Street → City → State → Country Day → Month → Quarter → Year Product → Category → Department

Generation Methods

  • Explicitly specified by users or experts.
  • Specified using schema relationships.
  • Automatically generated using the number of distinct values.
  • Generated through discretization of numerical attributes.

Uses

  • Data generalization
  • OLAP roll-up
  • Multilevel mining
  • Improved report readability

14. Basics of Data Mining 14 Marks

Data mining is the process of discovering valid, useful, understandable and previously unknown patterns from large datasets.

Major Functionalities

  • Concept description
  • Association analysis
  • Classification
  • Prediction
  • Clustering
  • Outlier analysis
  • Evolution and trend analysis

Data Mining System Architecture

Database / Data Warehouse | Database Server | Data Mining Engine | Pattern Evaluation | User Interface | Knowledge and Results

Pattern Evaluation

Interestingness measures are used to identify patterns that are useful, novel and understandable.

15. Data Mining Techniques 14 Marks

Classification

Assigns data objects to predefined classes.

Classifying an email as spam or not spam.

Clustering

Groups similar objects without predefined class labels.

Association Rule Mining

Discovers relationships among items occurring together.

Customers who buy bread may also buy butter.

Regression and Prediction

Predicts continuous values such as sales, price or demand.

Outlier Detection

Finds objects that differ significantly from normal behavior.

Sequential and Time-Series Mining

Discovers trends and patterns ordered by time.

Text and Web Mining

Extracts useful patterns from documents, web content, links and user behavior.

16. Knowledge Discovery Process (KDD) 14 Marks

Knowledge Discovery in Databases is the complete process of identifying useful knowledge from data. Data mining is one important step within KDD.

KDD Steps

Data Sources | 1. Data Cleaning | 2. Data Integration | 3. Data Selection | 4. Data Transformation | 5. Data Mining | 6. Pattern Evaluation | 7. Knowledge Presentation

1. Data Cleaning

Removes noise, errors and inconsistencies.

2. Data Integration

Combines multiple data sources.

3. Data Selection

Selects data relevant to the analysis task.

4. Data Transformation

Converts data into appropriate mining form.

5. Data Mining

Applies intelligent algorithms to discover patterns.

6. Pattern Evaluation

Identifies useful and interesting patterns.

7. Knowledge Presentation

Presents results through reports, charts, rules and visualizations.

Data mining and KDD are not identical. Data mining is a central step within the broader KDD process.

17. Applications of Data Mining 14 Marks

Retail and Marketing

  • Market basket analysis
  • Customer segmentation
  • Sales forecasting
  • Recommendation systems

Banking and Finance

  • Credit-risk analysis
  • Fraud detection
  • Customer profitability analysis

Healthcare

  • Disease prediction
  • Patient-risk analysis
  • Treatment effectiveness analysis

Telecommunication

  • Customer churn prediction
  • Network fault detection
  • Usage pattern analysis

Education

  • Student performance prediction
  • Dropout detection
  • Personalized learning

Cybersecurity

  • Intrusion detection
  • Malware behavior analysis
  • Abnormal activity detection

18. Challenges of Data Mining 14 Marks

Data Quality

Incomplete and noisy data reduces the reliability of discovered patterns.

Scalability

Algorithms must process very large and rapidly growing datasets.

High Dimensionality

Datasets may contain thousands of attributes.

Heterogeneous Data

Data may be relational, spatial, temporal, textual, multimedia or web-based.

Privacy and Security

Personal and confidential data must be protected.

Dynamic and Streaming Data

Patterns may need to be discovered continuously as data arrives.

Pattern Evaluation

A large number of patterns may be generated, but only a few may be useful.

User Interaction

Mining systems should include domain knowledge and produce understandable results.

Ethical Issues

Biased or unfair patterns can lead to harmful decisions.

19. Important Comparisons 14 Marks

Data Cleaning vs Data Transformation

Data CleaningData Transformation
Corrects errors and inconsistenciesChanges format or representation
Handles missing and noisy dataPerforms normalization and aggregation
Improves data qualityMakes data suitable for mining

Data Integration vs Data Reduction

FeatureIntegrationReduction
PurposeCombine sourcesReduce data size
Main issueSchema and value conflictsPreserving useful information
OutputUnified datasetCompact dataset

KDD vs Data Mining

KDDData Mining
Complete knowledge discovery processOne step in KDD
Includes cleaning and presentationApplies algorithms to discover patterns
Broad processCore analytical step

Classification vs Clustering

ClassificationClustering
Uses predefined classesNo predefined classes
Supervised learningUnsupervised learning
Predicts a class labelForms natural groups

Unit 2 Quick Revision

  • Preprocessing improves data quality before mining.
  • Cleaning handles missing, noisy and inconsistent data.
  • Integration combines multiple sources.
  • Transformation includes aggregation, generalization and normalization.
  • Reduction decreases size while preserving useful information.
  • Dimensionality reduction decreases the number of features.
  • Numerosity reduction replaces data with models or summaries.
  • Discretization converts continuous values into intervals.
  • Concept hierarchy creates multiple abstraction levels.
  • Data mining discovers useful patterns.
  • KDD includes cleaning, selection, transformation, mining and presentation.
  • Privacy, scalability and data quality are major challenges.

Important RGPV Exam Questions

Long Answer Questions

  1. Define data preprocessing and explain its major steps.
  2. Explain different data-quality problems.
  3. Explain methods of data cleaning with examples.
  4. Discuss different techniques for handling missing values.
  5. Explain noisy-data smoothing techniques.
  6. What is data integration? Explain its major issues.
  7. Explain data transformation and normalization methods.
  8. Define data reduction and explain its strategies.
  9. Explain dimensionality reduction and numerosity reduction.
  10. What is discretization? Explain its methods.
  11. Explain concept hierarchy generation with examples.
  12. Define data mining and explain its functionalities.
  13. Explain major data-mining techniques.
  14. Draw and explain the complete KDD process.
  15. Explain applications and challenges of data mining.

Short Answer Questions

  1. What is data preprocessing?
  2. Define noisy data.
  3. What is data integration?
  4. Define normalization.
  5. What is dimensionality reduction?
  6. Define discretization.
  7. What is a concept hierarchy?
  8. Define KDD.
  9. What is classification?
  10. What is outlier detection?
Exam Strategy: Draw the preprocessing and KDD diagrams. Explain every technique with one simple example and use comparison tables wherever possible.

Download Study Resources

Unit 2 PDF

Printable detailed notes will be uploaded soon.

Coming Soon

Important Questions

Most expected Unit 2 questions coming soon.

Coming Soon

PYQ Analysis

Repeated preprocessing and KDD questions coming soon.

Coming Soon

Frequently Asked Questions

It improves data quality, reduces processing time and helps mining algorithms produce more accurate and meaningful results.
They can be ignored, filled manually, replaced by a constant, mean, median, class-specific value or a predicted value.
KDD is the complete knowledge-discovery process, while data mining is the step that applies algorithms to discover patterns.
Normalization scales numerical values into a suitable range so that attributes with large values do not dominate the analysis.
It organizes detailed values into higher levels of abstraction, such as city to state to country.