本文整理了Java中org.dmg.pmml.tree.Node.getDefaultChild()
方法的一些代码示例,展示了Node.getDefaultChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getDefaultChild()
方法的具体详情如下:
包路径:org.dmg.pmml.tree.Node
类名称:Node
方法名:getDefaultChild
暂无
代码示例来源:origin: OryxProject/oryx
boolean defaultDecision = positiveRightChild.getId().equals(root.getDefaultChild());
代码示例来源:origin: jpmml/jpmml-evaluator
private Trail handleDefaultChild(Trail trail, Node node, EvaluationContext context){
// "The defaultChild missing value strategy requires the presence of the defaultChild attribute in every non-leaf Node"
String defaultChild = node.getDefaultChild();
if(defaultChild == null){
throw new MissingAttributeException(node, PMMLAttributes.NODE_DEFAULTCHILD);
}
trail.addMissingLevel();
List<Node> children = node.getNodes();
for(int i = 0, max = children.size(); i < max; i++){
Node child = children.get(i);
String id = child.getId();
if(id != null && (id).equals(defaultChild)){
// The predicate of the referenced Node is not evaluated
return handleTrue(trail, child, context);
}
}
// "Only Nodes which are immediate children of the respective Node can be referenced"
throw new InvalidAttributeException(node, PMMLAttributes.NODE_DEFAULTCHILD, defaultChild);
}
代码示例来源:origin: jpmml/jpmml-lightgbm
String id = node.getId();
Object score = node.getScore();
String defaultChild = node.getDefaultChild();
代码示例来源:origin: org.jpmml/jpmml-xgboost
String id = node.getId();
Object score = node.getScore();
String defaultChild = node.getDefaultChild();
代码示例来源:origin: jpmml/jpmml-xgboost
String id = node.getId();
Object score = node.getScore();
String defaultChild = node.getDefaultChild();
代码示例来源:origin: com.cloudera.oryx/oryx-app-common
boolean defaultDecision = positiveRightChild.getId().equals(root.getDefaultChild());
代码示例来源:origin: jpmml/jpmml-r
static
public ComplexNode toComplexNode(Node node){
ComplexNode result = new ComplexNode()
.setId(node.getId())
.setScore(node.getScore())
.setRecordCount(node.getRecordCount())
.setDefaultChild(node.getDefaultChild())
.setPredicate(node.getPredicate());
if(node.hasNodes()){
(result.getNodes()).addAll(node.getNodes());
} // End if
if(node.hasScoreDistributions()){
(result.getScoreDistributions()).addAll(node.getScoreDistributions());
}
return result;
}
}
代码示例来源:origin: jpmml/jpmml-model
value.setScore(node.getScore());
value.setRecordCount(node.getRecordCount());
value.setDefaultChild(node.getDefaultChild());
代码示例来源:origin: org.jpmml/pmml-model
value.setScore(node.getScore());
value.setRecordCount(node.getRecordCount());
value.setDefaultChild(node.getDefaultChild());
内容来源于网络,如有侵权,请联系作者删除!