本文整理了Java中org.dmg.pmml.Output.hasOutputFields()
方法的一些代码示例,展示了Output.hasOutputFields()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output.hasOutputFields()
方法的具体详情如下:
包路径:org.dmg.pmml.Output
类名称:Output
方法名:hasOutputFields
暂无
代码示例来源: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-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-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: 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-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-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 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-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: 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-evaluator
if(output != null && output.hasOutputFields()){
this.outputFields = CacheUtil.getValue(output, ModelEvaluator.outputFieldCache);
代码示例来源:origin: jpmml/jpmml-evaluator
if(output == null || !output.hasOutputFields()){
return predictions;
内容来源于网络,如有侵权,请联系作者删除!