public void EStep(List<Instance> instances) {
		int insIndex = 0;
		for (Instance instance : instances) {
			// get the closest cluster.
			int feaIndex =0;
			double minDistance = Double.MAX_VALUE;
			for (FeatureVector cluster : clusters) {
				if (MathUtilities.SquaredL2Distance(cluster, instance) < minDistance) {
					minDistance = MathUtilities.SquaredL2Distance(cluster, instance);
					assignments.set(insIndex, feaIndex);
				}
				feaIndex ++;
			}
			// add a new cluster if needed.
			if (minDistance > cluster_lambda) {
				clusters.add(instance.getFeatureVector());
				assignments.set(insIndex, feaIndex);
			}
			insIndex ++;
		}
	}