Search in sources :

Example 1 with OutputField

use of org.dmg.pmml.OutputFieldDocument.OutputField in project knime-core by knime.

the class ClassificationGBTModelExporter method addOutput.

private void addOutput(final MiningModel miningModel, final int idx) {
    Output output = miningModel.addNewOutput();
    OutputField f = output.addNewOutputField();
    f.setName(logitName(idx));
    f.setOptype(OPTYPE.CONTINUOUS);
    f.setDataType(DATATYPE.DOUBLE);
    f.setFeature(RESULTFEATURE.PREDICTED_VALUE);
// in 4.3 isFinalResult should be set to false
}
Also used : Output(org.dmg.pmml.OutputDocument.Output) OutputField(org.dmg.pmml.OutputFieldDocument.OutputField)

Example 2 with OutputField

use of org.dmg.pmml.OutputFieldDocument.OutputField in project knime-core by knime.

the class ClassificationGBTModelExporter method addRegressionOutputs.

private void addRegressionOutputs(final RegressionModel regression) {
    Output output = regression.addNewOutput();
    for (int i = 0; i < getGBTModel().getNrClasses(); i++) {
        OutputField p = output.addNewOutputField();
        p.setName(probabilityName(i));
        p.setOptype(OPTYPE.CONTINUOUS);
        p.setDataType(DATATYPE.DOUBLE);
        p.setFeature(RESULTFEATURE.PROBABILITY);
        p.setValue(getClassLabel(i));
    }
}
Also used : Output(org.dmg.pmml.OutputDocument.Output) OutputField(org.dmg.pmml.OutputFieldDocument.OutputField)

Aggregations

Output (org.dmg.pmml.OutputDocument.Output)2 OutputField (org.dmg.pmml.OutputFieldDocument.OutputField)2