134 .filter(filterType -> filterType.getId() ==
this.resultTypeId)
138 Map<Integer, List<CommonAttributeValue>> itemsToRemove =
new HashMap<>();
143 for (Entry<Integer, CommonAttributeValueList> listOfValues : Collections.unmodifiableMap(
this.instanceCountToAttributeValues).entrySet()) {
145 final Integer key = listOfValues.getKey();
149 if (maximumPercentageThreshold != 0) {
152 attributeType, value.getValue()).doubleValue();
153 Double commonalityPercentage = uniqueTypeValueTuples / uniqueCaseDataSourceTuples * 100;
154 int frequencyPercentage = commonalityPercentage.intValue();
155 if (frequencyPercentage > maximumPercentageThreshold) {
156 if (itemsToRemove.containsKey(key)) {
157 itemsToRemove.get(key).add(value);
159 List<CommonAttributeValue> toRemove =
new ArrayList<>();
161 itemsToRemove.put(key, toRemove);
165 LOGGER.log(Level.WARNING,
"Unable to determine frequency percentage attribute - frequency filter may not be accurate for these results.", ex);
170 for (Entry<Integer, List<CommonAttributeValue>> valuesToRemove : itemsToRemove.entrySet()) {
171 final Integer key = valuesToRemove.getKey();
172 final List<CommonAttributeValue> values = valuesToRemove.getValue();
175 if (instanceCountValue !=
null) {
176 instanceCountValue.removeMetaData(value);
177 if (instanceCountValue.getDelayedMetadataSet().isEmpty()) {
178 this.instanceCountToAttributeValues.remove(key);