private void computeClusterCentroids() {
		
		HashMap<Integer, ArrayList<Double>> sumClusterCentroids = new HashMap<Integer, ArrayList<Double>>();
		HashMap<Integer, Integer> memberCount = new HashMap<Integer, Integer>(); 
		for (Map.Entry<ArrayList<Integer>, Integer> entry : gridLabel.entrySet()) {
			// get the grid Index  
			ArrayList<Integer> gridIdx = entry.getKey();
			
			// get the cluster Id
			Integer clusterId = entry.getValue();
			
			// find in the clusterCentroids
			if ( sumClusterCentroids.containsKey(clusterId) ) {
				// if found...
				// get the previous cluster centroids
				ArrayList<Double> oldCentroids = sumClusterCentroids.get(clusterId);
				int oldCount = memberCount.get(clusterId);
				
				// get the new grid centroid
				if ( gridCentroids.containsKey(gridIdx) ) {
					ArrayList<Double> gridCentroid = gridCentroids.get(gridIdx);
					int countPoints = gridCount.get(gridIdx);
					sumClusterCentroids.put(clusterId, Util.additionArrayListDouble(oldCentroids, Util.multiplicationArrayListDouble(gridCentroid, countPoints)));
					memberCount.put(clusterId, oldCount + countPoints);
				}
				
			} else {
				// if not found, put this as the first time
				// multiply the gridCentroids with the gridCount
				if ( gridCentroids.containsKey(gridIdx) ) {
					ArrayList<Double> gridCentroid = gridCentroids.get(gridIdx);
					int countPoints = gridCount.get(gridIdx);
				
					memberCount.put(clusterId, countPoints);
					sumClusterCentroids.put(clusterId, Util.multiplicationArrayListDouble(gridCentroid, countPoints));
				}
			}
					    
		} // end for
		
		clusterCentroids = new HashMap<Integer, ArrayList<Double>>();
		for (Map.Entry<Integer, ArrayList<Double>> entry : sumClusterCentroids.entrySet()) {
			int clusterId = entry.getKey();
			ArrayList<Double> sumCentroid = entry.getValue();
			int count = memberCount.get(clusterId);
			clusterCentroids.put(clusterId, Util.divisionArrayListDouble(sumCentroid, count));
		}
		

		
	}