DATA SCIENCE – UNIT I
Introduction to Data Mining and Data Pre-processing
Course: II M.Sc. Computer Science
1. Introduction to Data Mining
In simple words, Data Mining means analysing data to discover something useful.
A supermarket analyses thousands of customer bills. It discovers that customers who buy bread also frequently buy milk. This relationship is a pattern discovered through Data Mining.
- Banking
- Education
- Healthcare
- Online Shopping
- Social Media
2. Kinds of Data and Patterns to Be Mined
Types of Data
| Type | Meaning | Example |
|---|---|---|
| Relational Data | Data stored in tables | Student records |
| Transactional Data | Buying and selling records | Shopping bills |
| Text Data | Written information | Emails and messages |
| Multimedia Data | Images, audio and videos | YouTube videos |
| Web Data | Information from websites | Website visits |
Patterns to Be Mined
- Association: Finding relationships between items.
Example: Customers buying bread also buy butter. - Classification: Assigning data to predefined categories.
Example: Classifying students as Pass or Fail. - Clustering: Grouping similar data together.
Example: Grouping customers based on shopping habits. - Prediction: Estimating future results.
Example: Predicting next month's sales.
3. Technologies Used in Data Mining
Data Mining combines different technologies to analyse data and discover useful knowledge.
| Technology | Purpose |
|---|---|
| Database | Stores data |
| Statistics | Analyses numerical data |
| Machine Learning | Learns patterns from data |
| Artificial Intelligence | Helps machines make intelligent decisions |
| Data Visualization | Displays data using charts |
| Big Data | Handles huge amounts of data |
4. Kinds of Applications Targeted
| Field | Application |
|---|---|
| Education | Predicting student performance |
| Healthcare | Identifying diseases |
| Banking | Detecting fraudulent transactions |
| Marketing | Understanding customer behaviour |
| Retail | Recommending products |
| Agriculture | Predicting crop production |
| Social Media | Analysing user interests |
5. Major Issues in Data Mining
Data Mining faces several challenges while analysing data.
- Data Quality: Data may contain incorrect or missing values.
- Data Privacy: Personal information must be protected.
- Data Security: Data must be protected from unauthorized access.
- Large Data Volume: Analysing huge amounts of data is difficult.
- Data Integration: Combining data from different sources is challenging.
- Data Complexity: Different types of data require different analysis methods.
6. Data Objects and Attribute Types
For example, each student in a college database is considered a data object.
| Roll No | Name | Age | Mark | Result |
|---|---|---|---|---|
| 101 | Ravi | 20 | 85 | Pass |
| 102 | Priya | 21 | 92 | Pass |
| 103 | Kumar | 20 | 35 | Fail |
- Each row represents a Data Object.
- Each column represents an Attribute.
Types of Attributes
| Attribute | Meaning | Example |
|---|---|---|
| Nominal | Categories without order | Department, Blood Group |
| Ordinal | Categories with order | Low, Medium, High |
| Interval | Equal intervals without a true zero | Temperature in Celsius |
| Ratio | Numerical values with a true zero | Age, Height, Weight |
7. Basic Statistical Descriptions of Data
Statistics helps us understand and summarize numerical data.
1. Mean (Average)
Mean is the sum of all values divided by the number of values.
Marks = 60, 70, 80, 90, 100
Mean = (60 + 70 + 80 + 90 + 100) / 5
Answer = 80
2. Median
Median is the middle value when data is arranged in ascending order.
Median = 30
3. Mode
Mode is the value that occurs most frequently.
Mode = 20
4. Minimum and Maximum
- Minimum: Smallest value.
- Maximum: Largest value.
5. Range
Range = Maximum - Minimum
Range = 95 - 35
Answer = 60
8. Data Visualization
It helps us understand information quickly and easily.
| Visualization | Purpose |
|---|---|
| Bar Chart | Comparing values |
| Pie Chart | Showing percentages |
| Line Chart | Showing changes over time |
| Histogram | Showing data distribution |
| Scatter Plot | Showing relationships between two variables |
- Python Matplotlib
- Tableau
- Power BI
- Microsoft Excel
DATA PRE-PROCESSING
9. Introduction to Data Pre-processing
Raw data may contain:
- Missing values
- Duplicate records
- Incorrect information
- Unnecessary data
- Different formats
A college database contains missing marks, duplicate student records and incorrect ages. Data Pre-processing helps prepare this data for accurate analysis.
10. Data Cleaning
Example – Before Cleaning:
| Name | Mark |
|---|---|
| Ravi | 85 |
| Priya | Missing |
| Kumar | 75 |
After Cleaning:
| Name | Mark |
|---|---|
| Ravi | 85 |
| Priya | 80 |
| Kumar | 75 |
Note: 80 is an illustrative replacement value.
Main Activities:- Handling missing values
- Removing duplicate records
- Correcting incorrect values
- Removing inconsistent data
11. Data Integration
Database 1 – Student Details
| Roll No | Name |
|---|---|
| 101 | Ravi |
| 102 | Priya |
Database 2 – Student Marks
| Roll No | Mark |
|---|---|
| 101 | 85 |
| 102 | 90 |
After Data Integration:
| Roll No | Name | Mark |
|---|---|---|
| 101 | Ravi | 85 |
| 102 | Priya | 90 |
12. Data Reduction
It helps save storage space and reduce processing time.
- Data Sampling
- Data Compression
- Feature Selection
- Dimensionality Reduction
13. Data Transformation
Example 1 – Normalization
Original Marks:
20, 40, 60, 80, 100
Normalized Values using Min-Max Normalization:
0, 0.25, 0.50, 0.75, 1.00
Example 2 – Data Formatting
Original Date: 23/11/2026
Transformed Date: 2026-11-23
Common Techniques:- Normalization
- Aggregation
- Smoothing
- Generalization
QUICK REVISION – UNIT I
| Topic | Easy Meaning |
|---|---|
| Data Mining | Finding useful patterns from data |
| Kinds of Data | Different forms of data |
| Patterns | Relationships and trends in data |
| Technologies | Tools used to analyse data |
| Applications | Real-world uses of Data Mining |
| Major Issues | Problems faced during data analysis |
| Data Objects | Individual records |
| Attributes | Properties of records |
| Statistics | Summarizing numerical data |
| Data Visualization | Presenting data using charts |
| Data Cleaning | Correcting data errors |
| Data Integration | Combining data sources |
| Data Reduction | Reducing data size |
| Data Transformation | Converting data into a suitable format |
IMPORTANT QUESTIONS
Part A – Short Answer Questions
- Define Data Mining.
- What is Classification?
- Define Clustering.
- What is a Data Object?
- List the types of Attributes.
- Define Mean, Median and Mode.
- What is Data Visualization?
- Define Data Cleaning.
- What is Data Integration?
- Define Data Reduction.
- What is Data Transformation?
Part B – Essay Questions
- Explain Data Mining and its applications.
- Discuss the different kinds of data and patterns to be mined.
- Explain Data Objects and Attribute Types with examples.
- Describe the basic statistical descriptions of data.
- Explain different Data Visualization techniques.
- Explain Data Pre-processing techniques with suitable examples.
CLASSROOM ACTIVITY
Imagine that you are managing a college database. Perform the following activities:
- Collect student names and marks.
- Identify missing marks.
- Remove duplicate records.
- Calculate the average marks.
- Identify students who passed and failed.
- Represent the marks using a bar chart.
Students will understand how raw data is collected, cleaned, analysed and represented using Data Science concepts.
REMEMBER
Data Pre-processing prepares the data for accurate analysis.
