k modes code example
Example: k modes
K Modes is a variation of K Means clustering algorithm.
In this algorithm the metric used is not the distance
but the dissimilarity of the data points.
For e.g.
A = [1, 0, 0, 1]
B = [0, 1, 0, 1]
Dissimilarity = 2
The points are assigned to cluster with the least dissimilarity.
The clusters are repositioned to the modes of the data points.
For e.g. if these points are assigned to a cluster,
A = [1, 0, 0, 1]
B = [0, 1, 0, 1]
C = [0, 1, 1, 0],
Mode = [0, 1, 0, 1] will be the new cluster position.