本文整理了Java中org.dmg.pmml.Output
类的一些代码示例,展示了Output
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output
类的具体详情如下:
包路径:org.dmg.pmml.Output
类名称:Output
暂无
代码示例来源:origin: ShifuML/shifu
/**
* Create the normalized output for model, since the final score should be 0 ~ 1000, instead of 0.o ~ 1.0
*
* @return output for model
*/
protected Output createNormalizedOutput() {
Output output = new Output();
output.withOutputFields(createOutputField(RAW_RESULT, OpType.CONTINUOUS, DataType.DOUBLE,
ResultFeatureType.PREDICTED_VALUE));
OutputField finalResult = createOutputField(FINAL_RESULT, OpType.CONTINUOUS, DataType.DOUBLE,
ResultFeatureType.TRANSFORMED_VALUE);
finalResult.withExpression(createNormExpr());
output.withOutputFields(finalResult);
return output;
}
代码示例来源:origin: jpmml/jpmml-model
@Override
public VisitorAction visit(Output output){
if(output.hasOutputFields()){
this.outputFields.addAll(output.getOutputFields());
}
return super.visit(output);
}
代码示例来源:origin: org.jpmml/pmml-model
@Override
public VisitorAction accept(Visitor visitor) {
VisitorAction status = visitor.visit(this);
if (status == VisitorAction.CONTINUE) {
visitor.pushParent(this);
if ((status == VisitorAction.CONTINUE)&&hasExtensions()) {
status = org.dmg.pmml.PMMLObject.traverse(visitor, getExtensions());
}
if ((status == VisitorAction.CONTINUE)&&hasOutputFields()) {
status = org.dmg.pmml.PMMLObject.traverse(visitor, getOutputFields());
}
visitor.popParent();
}
if (status == VisitorAction.TERMINATE) {
return VisitorAction.TERMINATE;
}
return VisitorAction.CONTINUE;
}
代码示例来源: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
.setDataType(DataType.INTEGER);
output.addOutputFields(nodeIdField);
代码示例来源:origin: jpmml/jpmml-model
public Output addOutputFields(OutputField... outputFields) {
getOutputFields().addAll(Arrays.asList(outputFields));
return this;
}
代码示例来源:origin: jpmml/jpmml-model
/**
* Create an instance of {@link Output }
*
*/
public Output createOutput() {
return new Output();
}
代码示例来源:origin: org.jpmml/pmml-model
static
private Set<Field<?>> getModelFields(DeepFieldResolver resolver, Model model){
Output output = model.getOutput();
if(output != null && output.hasOutputFields()){
return resolver.getFields(model, output);
} else
{
return resolver.getFields(model);
}
}
代码示例来源:origin: jpmml/jpmml-model
@Override
public Output addExtensions(Extension... extensions) {
getExtensions().addAll(Arrays.asList(extensions));
return this;
}
代码示例来源:origin: jpmml/jpmml-model
output = new Output();
.setSegmentId(id);
output.addOutputFields(outputField);
代码示例来源: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: org.jpmml/pmml-model
public Output addOutputFields(OutputField... outputFields) {
getOutputFields().addAll(Arrays.asList(outputFields));
return this;
}
代码示例来源:origin: org.jpmml/pmml-model
/**
* Create an instance of {@link Output }
*
*/
public Output createOutput() {
return new Output();
}
代码示例来源:origin: jpmml/jpmml-model
static
private Set<Field<?>> getModelFields(DeepFieldResolver resolver, Model model){
Output output = model.getOutput();
if(output != null && output.hasOutputFields()){
return resolver.getFields(model, output);
} else
{
return resolver.getFields(model);
}
}
代码示例来源:origin: org.jpmml/pmml-model
@Override
public Output addExtensions(Extension... extensions) {
getExtensions().addAll(Arrays.asList(extensions));
return this;
}
代码示例来源:origin: jpmml/jpmml-sklearn
Output output = new Output()
.addOutputFields(ModelUtil.createProbabilityField(FieldName.create("decisionFunction(" + categoricalLabel.getValue(i) + ")"), DataType.DOUBLE, categoricalLabel.getValue(i)));
代码示例来源:origin: org.jpmml/pmml-model
@Override
public VisitorAction visit(Output output){
if(output.hasOutputFields()){
this.outputFields.addAll(output.getOutputFields());
}
return super.visit(output);
}
代码示例来源:origin: jpmml/jpmml-sparkml
.setExpression(derivedField.getExpression());
output.addOutputFields(outputField);
代码示例来源:origin: jpmml/jpmml-model
@Override
public VisitorAction accept(Visitor visitor) {
VisitorAction status = visitor.visit(this);
if (status == VisitorAction.CONTINUE) {
visitor.pushParent(this);
if ((status == VisitorAction.CONTINUE)&&hasExtensions()) {
status = org.dmg.pmml.PMMLObject.traverse(visitor, getExtensions());
}
if ((status == VisitorAction.CONTINUE)&&hasOutputFields()) {
status = org.dmg.pmml.PMMLObject.traverse(visitor, getOutputFields());
}
visitor.popParent();
}
if (status == VisitorAction.TERMINATE) {
return VisitorAction.TERMINATE;
}
return VisitorAction.CONTINUE;
}
代码示例来源:origin: jpmml/jpmml-evaluator
@Override
public Map<FieldName, org.dmg.pmml.OutputField> load(Output output){
return IndexableUtil.buildMap(output.getOutputFields());
}
});
内容来源于网络,如有侵权,请联系作者删除!