use of org.kie.dmg.pmml.pmml_4_2.descr.FIELDUSAGETYPE in project drools by kiegroup.
the class AbstractModel method getFilteredMiningFieldMap.
public Map<String, MiningField> getFilteredMiningFieldMap(boolean includeFiltered, FIELDUSAGETYPE... filterTypes) {
Map<String, MiningField> mfm = new HashMap<>();
List<FIELDUSAGETYPE> filteredTypes = Arrays.asList(filterTypes);
for (String key : miningFieldMap.keySet()) {
MiningField field = miningFieldMap.get(key);
FIELDUSAGETYPE usageType = field.getUsageType();
if ((includeFiltered && filteredTypes.contains(usageType)) || (!includeFiltered && !filteredTypes.contains(usageType))) {
mfm.put(key, field);
}
}
return mfm;
}
Aggregations