本文整理汇总了Java中org.dmg.pmml.tree.TreeModel.getNode方法的典型用法代码示例。如果您正苦于以下问题:Java TreeModel.getNode方法的具体用法?Java TreeModel.getNode怎么用?Java TreeModel.getNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.dmg.pmml.tree.TreeModel
的用法示例。
在下文中一共展示了TreeModel.getNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TreeModelEvaluator
import org.dmg.pmml.tree.TreeModel; //导入方法依赖的package包/类
public TreeModelEvaluator(PMML pmml, TreeModel treeModel){
super(pmml, treeModel);
Node root = treeModel.getNode();
if(root == null){
throw new MissingElementException(treeModel, PMMLElements.TREEMODEL_NODE);
}
}
示例2: evaluateTree
import org.dmg.pmml.tree.TreeModel; //导入方法依赖的package包/类
private Node evaluateTree(Trail trail, EvaluationContext context){
TreeModel treeModel = getModel();
Node root = treeModel.getNode();
Boolean status = evaluateNode(trail, root, context);
if(status != null && status.booleanValue()){
trail = handleTrue(trail, root, context);
Node node = trail.getResult();
// "It is not possible that the scoring process ends in a Node which does not have a score attribute"
if(node != null && !node.hasScore()){
throw new MissingAttributeException(node, PMMLAttributes.NODE_SCORE);
}
return node;
}
return null;
}