public List<VSMElement> getBestFeatures() {
            List<VSMElement> bestWords = new ArrayList<>(docFrequencies.values());
            bestWords.sort(VSMElement.DESC_ORDER_COMPARATOR);
            List<VSMElement> selectedFeatures = new ArrayList<>();
            for (VSMElement vsm : bestWords) {
                if (vsm.getWeight() > minDF) {
                    selectedFeatures.add(vsm);
                }
                if (selectedFeatures.size() >= maxNumOfFeatures) {
                    break;
                }
            }
            return selectedFeatures;
        }
Selects best features based on document frequency.
ache/src/main/java/achecrawler/target/classifier/TargetClassifierBuilder.java