Search in sources :

Example 1 with RegressionTable

use of org.dmg.pmml.RegressionTableDocument.RegressionTable in project knime-core by knime.

the class ClassificationGBTModelExporter method addRegressionTables.

private void addRegressionTables(final RegressionModel regression) {
    for (int i = 0; i < getGBTModel().getNrClasses(); i++) {
        RegressionTable regTable = regression.addNewRegressionTable();
        regTable.setIntercept(0);
        regTable.setTargetCategory(getClassLabel(i));
        NumericPredictor np = regTable.addNewNumericPredictor();
        np.setName(logitName(i));
        np.setCoefficient(1d);
    }
}
Also used : NumericPredictor(org.dmg.pmml.NumericPredictorDocument.NumericPredictor) RegressionTable(org.dmg.pmml.RegressionTableDocument.RegressionTable)

Aggregations

NumericPredictor (org.dmg.pmml.NumericPredictorDocument.NumericPredictor)1 RegressionTable (org.dmg.pmml.RegressionTableDocument.RegressionTable)1