use of org.dmg.pmml.TargetValue in project shifu by ShifuML.
the class NNPmmlModelCreator method createMultiClassTargets.
private List<Target> createMultiClassTargets() {
List<Target> targets = new ArrayList<Target>();
for (int i = 0; i < modelConfig.getTags().size(); i++) {
String tag = modelConfig.getTags().get(i);
Target target = new Target();
target.setOpType(OpType.CONTINUOUS);
target.setField(new FieldName(modelConfig.getTargetColumnName() + "_" + i));
TargetValue targetValue = new TargetValue();
targetValue.setValue(Integer.toString(i));
targetValue.setDisplayValue(tag);
target.addTargetValues(targetValue);
targets.add(target);
}
return targets;
}
Aggregations