Search in sources :

Example 1 with FIELDUSAGETYPE

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;
}
Also used : MiningField(org.kie.dmg.pmml.pmml_4_2.descr.MiningField) HashMap(java.util.HashMap) FIELDUSAGETYPE(org.kie.dmg.pmml.pmml_4_2.descr.FIELDUSAGETYPE)

Aggregations

HashMap (java.util.HashMap)1 FIELDUSAGETYPE (org.kie.dmg.pmml.pmml_4_2.descr.FIELDUSAGETYPE)1 MiningField (org.kie.dmg.pmml.pmml_4_2.descr.MiningField)1