本文整理了Java中org.dmg.pmml.Output.addOutputFields()
方法的一些代码示例,展示了Output.addOutputFields()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output.addOutputFields()
方法的具体详情如下:
包路径:org.dmg.pmml.Output
类名称:Output
方法名:addOutputFields
暂无
代码示例来源:origin: jpmml/jpmml-sklearn
.setDataType(DataType.INTEGER);
output.addOutputFields(nodeIdField);
代码示例来源:origin: jpmml/jpmml-sklearn
.addOutputFields(ModelUtil.createProbabilityField(FieldName.create("decisionFunction(" + categoricalLabel.getValue(i) + ")"), DataType.DOUBLE, categoricalLabel.getValue(i)));
代码示例来源:origin: jpmml/jpmml-sklearn
@Override
protected ContinuousOutputFeature toContinuousFeature(FieldName name, DataType dataType, Supplier<? extends Expression> expressionSupplier){
PMMLEncoder encoder = ensureEncoder();
Output output = getOutput();
OutputField outputField = OutputUtil.getOutputField(output, name);
if(outputField == null){
Expression expression = expressionSupplier.get();
outputField = new OutputField(name, dataType)
.setOpType(OpType.CONTINUOUS)
.setResultFeature(ResultFeature.TRANSFORMED_VALUE)
.setFinalResult(false)
.setExpression(expression);
output.addOutputFields(outputField);
}
return new ContinuousOutputFeature(encoder, output, outputField);
}
代码示例来源:origin: jpmml/jpmml-model
.setSegmentId(id);
output.addOutputFields(outputField);
代码示例来源:origin: jpmml/jpmml-r
@Override
public TreeModel encodeModel(Schema schema){
S4Object binaryTree = getObject();
RGenericVector tree = (RGenericVector)binaryTree.getAttributeValue("tree");
Output output;
switch(this.miningFunction){
case REGRESSION:
output = new Output();
break;
case CLASSIFICATION:
CategoricalLabel categoricalLabel = (CategoricalLabel)schema.getLabel();
output = ModelUtil.createProbabilityOutput(DataType.DOUBLE, categoricalLabel);
break;
default:
throw new IllegalArgumentException();
}
output.addOutputFields(ModelUtil.createEntityIdField(FieldName.create("nodeId")));
TreeModel treeModel = encodeTreeModel(tree, schema)
.setOutput(output);
return treeModel;
}
代码示例来源:origin: jpmml/jpmml-sklearn
.setExpression(derivedField.getExpression());
output.addOutputFields(outputField);
代码示例来源:origin: jpmml/jpmml-sparkml
.setExpression(derivedField.getExpression());
output.addOutputFields(outputField);
代码示例来源:origin: org.jpmml/jpmml-h2o
segmentOutput.addOutputFields(outputField);
代码示例来源:origin: jpmml/jpmml-sklearn
.setFinalResult(false);
output.addOutputFields(outputField);
代码示例来源:origin: jpmml/jpmml-sklearn
.setRank(rank);
output.addOutputFields(outputField);
代码示例来源:origin: jpmml/jpmml-sklearn
output.addOutputFields(predictField);
代码示例来源:origin: jpmml/jpmml-r
.addOutputFields(outputField);
代码示例来源:origin: jpmml/jpmml-model
@Test
public void inspectFieldAnnotations(){
PMML pmml = createPMML();
AssociationModel model = new AssociationModel();
pmml.addModels(model);
assertVersionRange(pmml, Version.PMML_3_0, Version.PMML_4_3);
Output output = new Output();
model.setOutput(output);
assertVersionRange(pmml, Version.PMML_4_0, Version.PMML_4_3);
model.setScorable(Boolean.FALSE);
assertVersionRange(pmml, Version.PMML_4_1, Version.PMML_4_3);
model.setScorable(null);
assertVersionRange(pmml, Version.PMML_4_0, Version.PMML_4_3);
OutputField outputField = new OutputField()
.setRuleFeature(OutputField.RuleFeature.AFFINITY);
output.addOutputFields(outputField);
assertVersionRange(pmml, Version.PMML_4_1, Version.PMML_4_2);
outputField.setDataType(DataType.DOUBLE);
assertVersionRange(pmml, Version.PMML_4_1, Version.PMML_4_3);
model.setOutput(null);
assertVersionRange(pmml, Version.PMML_3_0, Version.PMML_4_3);
}
内容来源于网络,如有侵权,请联系作者删除!