org.dmg.pmml.tree.Node.getDefaultChild()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(195)

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

Node.getDefaultChild介绍

暂无

代码示例

代码示例来源:origin: OryxProject/oryx

  1. boolean defaultDecision = positiveRightChild.getId().equals(root.getDefaultChild());

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

  1. private Trail handleDefaultChild(Trail trail, Node node, EvaluationContext context){
  2. // "The defaultChild missing value strategy requires the presence of the defaultChild attribute in every non-leaf Node"
  3. String defaultChild = node.getDefaultChild();
  4. if(defaultChild == null){
  5. throw new MissingAttributeException(node, PMMLAttributes.NODE_DEFAULTCHILD);
  6. }
  7. trail.addMissingLevel();
  8. List<Node> children = node.getNodes();
  9. for(int i = 0, max = children.size(); i < max; i++){
  10. Node child = children.get(i);
  11. String id = child.getId();
  12. if(id != null && (id).equals(defaultChild)){
  13. // The predicate of the referenced Node is not evaluated
  14. return handleTrue(trail, child, context);
  15. }
  16. }
  17. // "Only Nodes which are immediate children of the respective Node can be referenced"
  18. throw new InvalidAttributeException(node, PMMLAttributes.NODE_DEFAULTCHILD, defaultChild);
  19. }

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

  1. String id = node.getId();
  2. Object score = node.getScore();
  3. String defaultChild = node.getDefaultChild();

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

  1. String id = node.getId();
  2. Object score = node.getScore();
  3. String defaultChild = node.getDefaultChild();

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

  1. String id = node.getId();
  2. Object score = node.getScore();
  3. String defaultChild = node.getDefaultChild();

代码示例来源:origin: com.cloudera.oryx/oryx-app-common

  1. boolean defaultDecision = positiveRightChild.getId().equals(root.getDefaultChild());

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

  1. static
  2. public ComplexNode toComplexNode(Node node){
  3. ComplexNode result = new ComplexNode()
  4. .setId(node.getId())
  5. .setScore(node.getScore())
  6. .setRecordCount(node.getRecordCount())
  7. .setDefaultChild(node.getDefaultChild())
  8. .setPredicate(node.getPredicate());
  9. if(node.hasNodes()){
  10. (result.getNodes()).addAll(node.getNodes());
  11. } // End if
  12. if(node.hasScoreDistributions()){
  13. (result.getScoreDistributions()).addAll(node.getScoreDistributions());
  14. }
  15. return result;
  16. }
  17. }

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

  1. value.setScore(node.getScore());
  2. value.setRecordCount(node.getRecordCount());
  3. value.setDefaultChild(node.getDefaultChild());

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

  1. value.setScore(node.getScore());
  2. value.setRecordCount(node.getRecordCount());
  3. value.setDefaultChild(node.getDefaultChild());

相关文章