Search in sources :

Example 1 with TargetValue

use of org.dmg.pmml.TargetValueDocument.TargetValue in project knime-core by knime.

the class PMMLSVMTranslator method addTargets.

/**
 * Writes the PMML target attributes.
 *
 * @param svmModel the SVM model to add the targets to
 * @param classColName name of the class column.
 */
private void addTargets(final SupportVectorMachineModel svmModel, final String classColName) {
    Target target = svmModel.addNewTargets().addNewTarget();
    target.setField(classColName);
    target.setOptype(OPTYPE.CATEGORICAL);
    // add target values
    for (String tv : m_targetValues) {
        TargetValue targetValue = target.addNewTargetValue();
        targetValue.setValue(tv);
    }
}
Also used : Target(org.dmg.pmml.TargetDocument.Target) TargetValue(org.dmg.pmml.TargetValueDocument.TargetValue)

Aggregations

Target (org.dmg.pmml.TargetDocument.Target)1 TargetValue (org.dmg.pmml.TargetValueDocument.TargetValue)1