org.dmg.pmml.Output.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(75)

本文整理了Java中org.dmg.pmml.Output.<init>()方法的一些代码示例,展示了Output.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output.<init>()方法的具体详情如下:
包路径:org.dmg.pmml.Output
类名称:Output
方法名:<init>

Output.<init>介绍

暂无

代码示例

代码示例来源:origin: org.jpmml/pmml-model

/**
 * Create an instance of {@link Output }
 * 
 */
public Output createOutput() {
  return new Output();
}

代码示例来源:origin: jpmml/jpmml-model

/**
 * Create an instance of {@link Output }
 * 
 */
public Output createOutput() {
  return new Output();
}

代码示例来源:origin: jpmml/jpmml-sklearn

Output output = new Output()
  .addOutputFields(ModelUtil.createProbabilityField(FieldName.create("decisionFunction(" + categoricalLabel.getValue(i) + ")"), DataType.DOUBLE, categoricalLabel.getValue(i)));

代码示例来源: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: ShifuML/shifu

/**
 * Create the normalized output for model, since the final score should be 0 ~ 1000, instead of 0.o ~ 1.0
 * 
 * @param id
 *            output id
 * @return output for model
 */
protected Output createNormalizedOutput(int id) {
  Output output = new Output();
  output.withOutputFields(createOutputField(RAW_RESULT + "_" + id, OpType.CONTINUOUS, DataType.DOUBLE,
      ResultFeatureType.PREDICTED_VALUE));
  OutputField finalResult = createOutputField(FINAL_RESULT + "_" + id, OpType.CONTINUOUS, DataType.DOUBLE,
      ResultFeatureType.TRANSFORMED_VALUE);
  finalResult.withExpression(createNormExpr(id));
  output.withOutputFields(finalResult);
  return output;
}

代码示例来源:origin: jpmml/jpmml-model

output = new Output();

代码示例来源: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

Output output = new Output();

代码示例来源:origin: jpmml/jpmml-r

Output output = new Output()
  .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);
}

相关文章