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);
}
}
Aggregations