public int selectFinalLabel( int vectorIndex){
		
		//we can have max 10 labels
		int[] labelCount = new int[10];
		int result = -1;
		
		// find the count for each label
		for(int i=0; i<minKLabels.length; i++){
			labelCount[minKLabels[i]]++;
		}
		
		HashSet<Integer> labelsWithHighestCount = new HashSet<Integer>();
		//select the label/s with the highest count. This is the worst way we can do it but still...
		for(int i=0; i <labelCount.length; i++){
			boolean flag = true;
			for(int j = 0; j<labelCount.length; j++){
				if(labelCount[i] < labelCount[j]){
					flag = false;
					break;
				}
			}
			if(flag){
				labelsWithHighestCount.add(i);
			}
		}
		
		// now if there is more than 1 label in the set , then we find which has the least euclidean distance and take.
		// If there is only one label it will put that as the final label. (No specific code for that.)
		for(int i=0; i<minKLabels.length; i++){
			if(labelsWithHighestCount.contains(minKLabels[i])){
				result = minKLabels[i]; 
				break;
			}
		}
		return result;
	}