K-MODES CLUSTERING IN MACHINE LEARNING

K-MODES CLUSTERING
It is widely used algorithm for grouping the categorical data because it is easy to implement and efficiently handles large amount of data. It defines clusters based on the number of matching categories between data points. The k-modes clustering algorithm is an extension of k-means clustering algorithm.
The modifications done in the k-means for k-modes are:
1.Using a simple matching dissimilarity measure for categorical objects.
2.Replacing means of clusters by modes.
3.Using a frequency-based method to update the modes.
Let X, x11, x12,......,xnm be the data set consists of n number of objects with m number of attributes. The main objective of the k-modes clustering algorithm is to group the data objects X into K clusters by minimize the cost function: 
K-modes algorithm where inputs are Data objects (X) and Number of clusters (K).

Step 1: Randomly select the K initial modes from the data objects such that Cj, j = 1,2,,K Step 2: Find the matching dissimilarity between the each K initial cluster modes and each data objects using the Euation:
Step 3: Evaluate the fitness using the following Equation
Step 4: Find the minimum mode values in each data object i.e. finding the objects nearest to the initial cluster modes.
Step 5: Assign the data objects to the nearest cluster centroid modes.
Step 6: Update the modes by apply the frequency-based method on newly formed clusters. 
Step 7: Recalculate the similarity between the data objects and the updated modes.
Step 8: Repeat the step 4 and step 5 until no changes in the cluster ship of data objects. 




Previous Post Next Post