code: protected void removeRareFeatures(Map<Object, Double> featureCounts, int rareFeatureThreshold) {
          logger.debug("removeRareFeatures()");
  
          Iterator<Map.Entry<Object, Double>> it = featureCounts.entrySet().iterator();
          while(it.hasNext()) {
              Map.Entry<Object, Double> entry = it.next();
              if(entry.getValue()<rareFeatureThreshold) {
                  it.remove();
              }
          }
      }
docs: Removes any feature with less occurrences than the threshold.
  
  @param featureCounts
  @param rareFeatureThreshold