UNIT 4 NOTES
UNIT 4 NOTES
K-means clustering is a popular unsupervised learning algorithm used for data clustering and
partitioning. The goal of k-means clustering is to group similar data points together in a way that
maximizes the similarity within each group (called a cluster) while minimizing the similarity between
different groups.
The final result of the k-means algorithm is a set of k clusters, each with its centroid, and each data point
belonging to one of the clusters. The quality of the clustering depends on the initial position of the
centroids and the distance metric used. K-means is a computationally efficient algorithm and can be
used on large datasets, making it a popular choice for clustering applications in various fields such as
computer science, biology, and social sciences.
Convergence: The algorithm stops when the centroids no longer move. This
indicates that the clustering has reached a stable state, and further
iterations will not change the result.
The k-means algorithm is widely used for clustering tasks in various fields,
such as customer segmentation in marketing, image segmentation in
computer vision, and gene expression analysis in bioinformatics.
Itemset Support
{Bread, Milk, Cheese}. 2
{Bread, Milk, Diapers 2
{Milk, Cheese, Diapers} 2
Step 4: Repeat steps 2 and 3 until no more frequent itemsets can be generated
We can stop here because no more frequent itemsets can be generated
Step 5: Generate association rules
Using the frequent itemsets generated in the previous step, generate association
rules between itemsets by splitting them into antecedents and consequents.
Calculate the confidence of each rule, which measures the probability of the
consequent itemset appearing given that the antecedent itemset appears. Only
the rules that meet a minimum confidence threshold are considered strong rules.
Let’s set the minimum confidence threshold to 0.5. Here are the strong
association rules for our dataset:
Rule Support Confidence
{Bread} => {Milk} 3 3/4 = 0.75
{Milk} => {Bread} 3 3/4 = 0.75
{Bread} => {Cheese}2 2/4 = 0.5
{Cheese} => {Bread}2 2/3 = 0.67
{Milk} => {Cheese} 2 2/4 = 0.5
{Cheese} => {Milk} 2 2/3 = 0.67
{Milk} => {Diapers} 2 2/4 = 0.5
{Diapers} => {Milk} 2 2/3 = 0.67
Ans :
Steps of SVD:
Ans:
8 MARKS
UNIT 4