School of Computer Science, Engineering and Applications (SCSEA)
Academic Year: 2025-26 [Link] S.Y (Sem IV)
Subject: Data Mining and Warehousing (CSE2103)
LAB - 8
Name: Azad Sharanbasappa Hallur PRN: 20250812102
Title
Clustering Analysis using K-Means Algorithm
Aim
To apply clustering techniques to group similar data points and analyze patterns using the K-
Means Clustering algorithm.
Experiment / Procedure
1. Import Libraries
Import required libraries such as Pandas, NumPy, Matplotlib, and Scikit-learn.
2. Load Dataset
Load the dataset using read_csv() and display sample data.
3. Data Preprocessing
o Handle missing values
o Select relevant features
o Normalize/scale the data
20250812102 1
4. Choose Number of Clusters (K)
o Use Elbow Method to determine optimal number of clusters
5. Apply K-Means Algorithm
o Initialize K-Means model
o Fit the model on dataset
o Assign cluster labels to each data point
6. Visualization
o Plot clusters using scatter plot
o Different colors represent different clusters
7. Analysis
o Interpret cluster groups
o Identify patterns among grouped data
Conclusion
K-Means Clustering is effective for grouping unlabeled data.
It helps in discovering hidden patterns and structures in data.
Clustering is useful for segmentation and decision-making.
Result:
20250812102 2
20250812102 3
20250812102 4
20250812102 5