Search in sources :

Example 6 with MiningField

use of org.kie.dmg.pmml.pmml_4_2.descr.MiningField in project drools by kiegroup.

the class PMML4UnitImpl method getMiningFields.

/**
 * Retrieves a Map with entries that consist of
 * key -> a model identifier
 * value -> the List of raw MiningField objects belonging to the model referenced by the key
 * @return The Map of model identifiers and their corresponding list of raw MiningField objects
 */
public Map<String, List<MiningField>> getMiningFields() {
    Map<String, List<MiningField>> miningFieldsMap = new HashMap<>();
    for (PMML4Model model : getModels()) {
        List<MiningField> miningFields = model.getRawMiningFields();
        miningFieldsMap.put(model.getModelId(), miningFields);
        model.getChildModels();
    }
    return miningFieldsMap;
}
Also used : MiningField(org.kie.dmg.pmml.pmml_4_2.descr.MiningField) HashMap(java.util.HashMap) PMML4Model(org.kie.pmml.pmml_4_2.PMML4Model) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

MiningField (org.kie.dmg.pmml.pmml_4_2.descr.MiningField)5 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)2 PMML4Model (org.kie.pmml.pmml_4_2.PMML4Model)2 List (java.util.List)1 Attribute (org.dmg.pmml.pmml_4_2.descr.Attribute)1 Characteristic (org.dmg.pmml.pmml_4_2.descr.Characteristic)1 Characteristics (org.dmg.pmml.pmml_4_2.descr.Characteristics)1 Extension (org.dmg.pmml.pmml_4_2.descr.Extension)1 MiningField (org.dmg.pmml.pmml_4_2.descr.MiningField)1 MiningSchema (org.dmg.pmml.pmml_4_2.descr.MiningSchema)1 Output (org.dmg.pmml.pmml_4_2.descr.Output)1 Scorecard (org.dmg.pmml.pmml_4_2.descr.Scorecard)1 ScorecardPMMLGenerator (org.drools.scorecards.pmml.ScorecardPMMLGenerator)1 FIELDUSAGETYPE (org.kie.dmg.pmml.pmml_4_2.descr.FIELDUSAGETYPE)1 MiningSchema (org.kie.dmg.pmml.pmml_4_2.descr.MiningSchema)1 OutputField (org.kie.dmg.pmml.pmml_4_2.descr.OutputField)1 Import (org.kie.soup.project.datamodel.imports.Import)1