public static void kMeansClustering(int k,List<Vector> dataset){
		Cluster[] clusters = new Cluster[k];
		Collections.shuffle(dataset);
		for(int i = 0;i<k;i++){
			Vector randomVector = dataset.get(i);
			clusters[i] = new Cluster(randomVector);
			clusters[i].addVector(randomVector);
		}		
		DistanceMeasure dm = new EuclideanDistance();
		boolean clusteringStable = false;
		String previousClustering = "";
		while(!clusteringStable){
			for(Cluster c : clusters){
				c.determineNewSeed();
				c.members.clear();
			}
			for(Vector v : dataset){
				double smallestDistance = Double.MAX_VALUE;
				Cluster closesCluster = null;
				for(Cluster c : clusters){
					double distance = dm.distance(v, c.getSeed()); 
					if(distance<smallestDistance){
						closesCluster = c;
						smallestDistance = distance;
					}
				}
				closesCluster.addVector(v);
			}
			
			StringBuilder newClustering = new StringBuilder();
			for(Cluster c : clusters){
				newClustering.append(c.toString());
			}
			clusteringStable = previousClustering.equals(newClustering.toString());
			previousClustering = newClustering.toString();
		}
		for(Cluster c : clusters){
			System.out.println(c.toString());
		}
	}