# The implementation of overlapping clustering (NEO-K-Means)

I am researching on overlapping clustering (Clusters are non-disjoint).I found that Neo-K-Means is probably the state-of-the-art now.But, when I tried implementing the algorithm with the multi-label data set (music-emotion/scene).I hadn't got the high result as declared in the paper (My results are around 0.4 F-measure , the paper declare 0.55 for music and 0.626 for scene ). In spite of , I had initialized the experiments with the best situation for K-Means (centroid seeds are means of each class and the total cluster assignments are equal to reality) . I wonder what wrong with my implementation method , orDo I have to do something extra for getting higher result ?

PS. I have found the further research of Neo-Kmeans , but I think I should clear this point before go further.

This is my code

while (count < TIMES) {

DC = new ArrayList<DistanceCollection>();

for (int i = 0; i < K; i++) {

cluster[i] = new Cluster();

}

for (int i = 0; i < dataList.size(); i++) {

for (int j = 0; j < K; j++) {

DistanceCollection dist = new DistanceCollection();
dist.dataNum = dataList.get(i).dataNum;
dist.clusterNum = j;
dist.distanceFromCluster = euclidean(centroids[j], dataList.get(i));

}

}

// sort the distances for argmin(i,j) checking
Collections.sort(DC, new DistanceCollectionComparator());

int totalAssignment = 2585;
int assignedCluster = -1;
int assignmentCount = 0;
int[] dataSelectionCheck = new int[2407];
int dataMatrix[][] = new int[6][2407];

for (int i = 0;  assignmentCount < dataList.size(); i++) {

int clusterNum = DC.get(i).clusterNum;
int dataNum = DC.get(i).dataNum;

if (dataMatrix[clusterNum][dataNum] == 0 && dataSelectionCheck[dataNum] == 0) {

dataMatrix[clusterNum][dataNum] = 1;
dataSelectionCheck[dataNum] = 1;

assignmentCount++;

}

}

for (int i = 0; assignmentCount < totalAssignment; i++) {

int clusterNum = DC.get(i).clusterNum;
int dataNum = DC.get(i).dataNum;

if (dataMatrix[clusterNum][dataNum] == 0) {

dataMatrix[clusterNum][dataNum] = 1;

assignmentCount++;

}

}

for (int i = 0; i < K; i++) {

if (cluster[i].dataMembers.size() > 0) {

for (int j = 0; j < centroids[i].features.length ; j++) {

double accumFeaturesValue = 0;

for (int k = 0; k < cluster[i].dataMembers.size(); k++) {

accumFeaturesValue += cluster[i].dataMembers.get(k).features[j];

}

centroids[i].features[j] = accumFeaturesValue / cluster[i].dataMembers.size();

}
}

}

count++ ;

}