Search in sources :

Example 11 with Scorecard

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

the class PMML4ModelFactory method getModel.

public PMML4Model getModel(Segment segment, MiningSegmentation segmentation) {
    PMML4Model model = null;
    if (segment.getMiningModel() != null) {
        MiningModel mm = segment.getMiningModel();
        model = new Miningmodel(mm.getModelName(), mm, segmentation.getOwner(), null);
    } else if (segment.getRegressionModel() != null) {
        RegressionModel rm = segment.getRegressionModel();
        model = new Regression(rm.getModelName(), rm, segmentation.getOwner(), null);
    } else if (segment.getScorecard() != null) {
        Scorecard sc = segment.getScorecard();
        model = new ScorecardModel(sc.getModelName(), sc, segmentation.getOwner(), null);
    } else if (segment.getTreeModel() != null) {
        TreeModel tm = segment.getTreeModel();
        model = new Treemodel(tm.getModelName(), tm, segmentation.getOwner(), null);
    }
    return model;
}
Also used : TreeModel(org.kie.dmg.pmml.pmml_4_2.descr.TreeModel) MiningModel(org.kie.dmg.pmml.pmml_4_2.descr.MiningModel) PMML4Model(org.kie.pmml.pmml_4_2.PMML4Model) Scorecard(org.kie.dmg.pmml.pmml_4_2.descr.Scorecard) RegressionModel(org.kie.dmg.pmml.pmml_4_2.descr.RegressionModel)

Aggregations

Scorecard (org.dmg.pmml.pmml_4_2.descr.Scorecard)8 PMML (org.dmg.pmml.pmml_4_2.descr.PMML)6 Test (org.junit.Test)6 Characteristics (org.dmg.pmml.pmml_4_2.descr.Characteristics)3 Extension (org.dmg.pmml.pmml_4_2.descr.Extension)3 RegressionModel (org.kie.dmg.pmml.pmml_4_2.descr.RegressionModel)3 Scorecard (org.kie.dmg.pmml.pmml_4_2.descr.Scorecard)3 TreeModel (org.kie.dmg.pmml.pmml_4_2.descr.TreeModel)3 ArrayList (java.util.ArrayList)2 Attribute (org.dmg.pmml.pmml_4_2.descr.Attribute)2 Characteristic (org.dmg.pmml.pmml_4_2.descr.Characteristic)2 Output (org.dmg.pmml.pmml_4_2.descr.Output)2 KieServices (org.kie.api.KieServices)2 KieContainer (org.kie.api.runtime.KieContainer)2 MiningModel (org.kie.dmg.pmml.pmml_4_2.descr.MiningModel)2 PMML4Model (org.kie.pmml.pmml_4_2.PMML4Model)2 ClusteringModel (org.dmg.pmml.pmml_4_2.descr.ClusteringModel)1 MiningField (org.dmg.pmml.pmml_4_2.descr.MiningField)1 MiningSchema (org.dmg.pmml.pmml_4_2.descr.MiningSchema)1 NaiveBayesModel (org.dmg.pmml.pmml_4_2.descr.NaiveBayesModel)1