private void calculateSmoothingFactor(){
		if (!vocab.isWordUpdated(ID)) {
			clusterWords();
			//zeros = (K+1)^2 - occupied contexts
			//count nonZeros and find the minimum and its frequency
			int nonZeros = 0;
			int min = 0;
			int minValues = 0;
			for (int[] ai : clusterContexts){
				for (int j : ai){
					if (j!=0) {
						nonZeros++;
						//initialize min
						if ((min==0) || (min>j)) {
							min=j;
							minValues=1;
						} else if (j==min){
							minValues++;
						}

					}

				}
			}

			int zeros = (vocab.getCorpus().getLearner().getClusterContexts().size() - 
					nonZeros);
			if (zeros!=0) {
				smoothingCoefficent = 1 - (minValues * 1.0 / frequency);
				smoothingFactor = minValues * 1.0 / (frequency * zeros);  
			} else {
				//if there are no zeros, don't smoothe
				smoothingFactor=0;
				smoothingCoefficent= 1;

				//Register in the vocabulary as calculated
				vocab.registerWordUpdate(ID);
			}
		}
	}