Search in sources :

Example 6 with MiningField

use of org.dmg.pmml.MiningFieldDocument.MiningField in project knime-core by knime.

the class ClassificationGBTModelExporter method addAggregationMiningScheme.

private void addAggregationMiningScheme(final RegressionModel regression) {
    MiningSchema miningSchema = regression.addNewMiningSchema();
    // add target field
    MiningField targetField = miningSchema.addNewMiningField();
    targetField.setName(getGBTModel().getMetaData().getTargetMetaData().getAttributeName());
    targetField.setUsageType(FIELDUSAGETYPE.TARGET);
    // add class logits
    for (int i = 0; i < getGBTModel().getNrClasses(); i++) {
        MiningField logit = miningSchema.addNewMiningField();
        logit.setName(logitName(i));
    }
}
Also used : MiningField(org.dmg.pmml.MiningFieldDocument.MiningField) MiningSchema(org.dmg.pmml.MiningSchemaDocument.MiningSchema)

Aggregations

MiningField (org.dmg.pmml.MiningFieldDocument.MiningField)6 MiningSchema (org.dmg.pmml.MiningSchemaDocument.MiningSchema)5 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 SchemaType (org.apache.xmlbeans.SchemaType)2 DerivedField (org.dmg.pmml.DerivedFieldDocument.DerivedField)2 BigInteger (java.math.BigInteger)1 LinkedHashSet (java.util.LinkedHashSet)1 XmlCursor (org.apache.xmlbeans.XmlCursor)1 XmlObject (org.apache.xmlbeans.XmlObject)1 Aggregate (org.dmg.pmml.AggregateDocument.Aggregate)1 Apply (org.dmg.pmml.ApplyDocument.Apply)1 AssociationModel (org.dmg.pmml.AssociationModelDocument.AssociationModel)1 DataDictionary (org.dmg.pmml.DataDictionaryDocument.DataDictionary)1 DataField (org.dmg.pmml.DataFieldDocument.DataField)1 Discretize (org.dmg.pmml.DiscretizeDocument.Discretize)1 FIELDUSAGETYPE (org.dmg.pmml.FIELDUSAGETYPE)1 FieldColumnPair (org.dmg.pmml.FieldColumnPairDocument.FieldColumnPair)1 FieldRef (org.dmg.pmml.FieldRefDocument.FieldRef)1 GeneralRegressionModel (org.dmg.pmml.GeneralRegressionModelDocument.GeneralRegressionModel)1