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

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

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

Output.getOutputFields介绍

暂无

代码示例

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

public Output addOutputFields(OutputField... outputFields) {
  getOutputFields().addAll(Arrays.asList(outputFields));
  return this;
}

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

public Output addOutputFields(OutputField... outputFields) {
  getOutputFields().addAll(Arrays.asList(outputFields));
  return this;
}

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

@Override
  public Map<FieldName, org.dmg.pmml.OutputField> load(Output output){
    return IndexableUtil.buildMap(output.getOutputFields());
  }
});

代码示例来源: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 visit(Output output){
  if(output.hasOutputFields()){
    this.outputFields.addAll(output.getOutputFields());
  }
  return super.visit(output);
}

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

@Override
public VisitorAction visit(Output output){
  if(output.hasOutputFields()){
    declare(output, output.getOutputFields());
    suppress(output.getOutputFields());
  }
  return super.visit(output);
}

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

@Override
public VisitorAction visit(Output output){
  if(output.hasOutputFields()){
    declare(output, output.getOutputFields());
    suppress(output.getOutputFields());
  }
  return super.visit(output);
}

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

protected List<OutputField> createOutputFields(){
  M model = getModel();
  Output output = model.getOutput();
  List<OutputField> resultFields = new ArrayList<>();
  if(output != null && output.hasOutputFields()){
    List<org.dmg.pmml.OutputField> outputFields = output.getOutputFields();
    Predicate<org.dmg.pmml.OutputField> outputFilter = ensureOutputFilter();
    outputFields:
    for(org.dmg.pmml.OutputField outputField : outputFields){
      if(outputFilter.test(outputField)){
        OutputField resultField = new OutputField(outputField);
        resultFields.add(resultField);
      }
    }
  }
  return ImmutableList.copyOf(resultFields);
}

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

protected Set<org.dmg.pmml.ResultFeature> collectResultFeatures(){
  M model = getModel();
  Output output = model.getOutput();
  Set<org.dmg.pmml.ResultFeature> resultFeatures = EnumSet.noneOf(org.dmg.pmml.ResultFeature.class);
  if(output != null && output.hasOutputFields()){
    List<org.dmg.pmml.OutputField> outputFields = output.getOutputFields();
    for(org.dmg.pmml.OutputField outputField : outputFields){
      resultFeatures.add(outputField.getResultFeature());
    }
  }
  return Sets.immutableEnumSet(resultFeatures);
}

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

static
  public OutputField getOutputField(Output output, FieldName name){

    if(output.hasOutputFields()){
      List<OutputField> outputFields = output.getOutputFields();

      for(OutputField outputField : outputFields){

        if((name).equals(outputField.getName())){
          return outputField;
        }
      }
    }

    return null;
  }
}

代码示例来源:origin: cheng-li/pyramid

@Override
  public Feature apply(Model model){
    Output output = model.getOutput();
    if(output == null || !output.hasOutputFields()){
      throw new IllegalArgumentException();
    }
    OutputField outputField = Iterables.getLast(output.getOutputFields());
    return new ContinuousFeature(null, outputField.getName(), outputField.getDataType());
  }
};

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

public org.dmg.pmml.Model registerModel(SparkMLEncoder encoder){
  Schema schema = encodeSchema(encoder);
  Label label = schema.getLabel();
  org.dmg.pmml.Model model = encodeModel(schema);
  List<OutputField> sparkOutputFields = registerOutputFields(label, encoder);
  if(sparkOutputFields != null && sparkOutputFields.size() > 0){
    org.dmg.pmml.Model lastModel = getLastModel(model);
    Output output = ModelUtil.ensureOutput(lastModel);
    List<OutputField> outputFields = output.getOutputFields();
    outputFields.addAll(0, sparkOutputFields);
  }
  return model;
}

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

static
public Set<Field<?>> getActiveFields(DeepFieldResolver resolver, Model model){
  Set<Field<?>> modelFields = getModelFields(resolver, model);
  FieldReferenceFinder fieldReferenceFinder = new FieldReferenceFinder(){
    @Override
    public VisitorAction visit(LocalTransformations localTransformations){
      return VisitorAction.SKIP;
    }
  };
  fieldReferenceFinder.applyTo(model);
  Set<Field<?>> activeFields = FieldUtil.selectAll(modelFields, fieldReferenceFinder.getFieldNames());
  Output output = model.getOutput();
  if(output != null){
    activeFields.removeAll(output.getOutputFields());
  }
  return activeFields;
}

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

activeFields.removeAll(output.getOutputFields());

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

static
public Set<Field<?>> getActiveFields(DeepFieldResolver resolver, Model model){
  Set<Field<?>> modelFields = getModelFields(resolver, model);
  FieldReferenceFinder fieldReferenceFinder = new FieldReferenceFinder(){
    @Override
    public VisitorAction visit(LocalTransformations localTransformations){
      return VisitorAction.SKIP;
    }
  };
  fieldReferenceFinder.applyTo(model);
  Set<Field<?>> activeFields = FieldUtil.selectAll(modelFields, fieldReferenceFinder.getFieldNames());
  Output output = model.getOutput();
  if(output != null){
    activeFields.removeAll(output.getOutputFields());
  }
  return activeFields;
}

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

activeFields.removeAll(output.getOutputFields());

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

List<OutputField> outputFields = output.getOutputFields();

相关文章