本文整理了Java中org.dmg.pmml.tree.Node.hasScoreDistributions()
方法的一些代码示例,展示了Node.hasScoreDistributions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.hasScoreDistributions()
方法的具体详情如下:
包路径:org.dmg.pmml.tree.Node
类名称:Node
方法名:hasScoreDistributions
暂无
代码示例来源:origin: jpmml/jpmml-evaluator
@Override
public VisitorAction visit(Node node){
if(node.hasScoreDistributions()){
List<ScoreDistribution> scoreDistributions = node.getScoreDistributions();
for(ListIterator<ScoreDistribution> it = scoreDistributions.listIterator(); it.hasNext(); ){
it.set(intern(it.next()));
}
}
return super.visit(node);
}
代码示例来源:origin: org.jpmml/pmml-evaluator-extension
@Override
public VisitorAction visit(Node node){
if(node.hasScoreDistributions()){
List<ScoreDistribution> scoreDistributions = node.getScoreDistributions();
for(ListIterator<ScoreDistribution> it = scoreDistributions.listIterator(); it.hasNext(); ){
it.set(intern(it.next()));
}
}
return super.visit(node);
}
代码示例来源:origin: jpmml/jpmml-evaluator
@Override
public VisitorAction visit(Node node){
TreeModel treeModel = getTreeModel();
MiningFunction miningFunction = treeModel.getMiningFunction();
switch(miningFunction){
case REGRESSION:
if(node.hasScoreDistributions()){
List<ScoreDistribution> scoreDistributions = node.getScoreDistributions();
scoreDistributions.clear();
}
break;
default:
break;
}
return super.visit(node);
}
代码示例来源:origin: jpmml/jpmml-evaluator
@Override
protected <V extends Number> Map<FieldName, ?> evaluateClassification(ValueFactory<V> valueFactory, EvaluationContext context){
TreeModel treeModel = getModel();
TargetField targetField = getTargetField();
Trail trail = new Trail();
Node node = evaluateTree(trail, context);
if(node == null){
return TargetUtil.evaluateClassificationDefault(valueFactory, targetField);
} // End if
if(!node.hasScoreDistributions()){
NodeVote result = createNodeVote(node);
return TargetUtil.evaluateVote(targetField, result);
}
double missingValuePenalty = 1d;
int missingLevels = trail.getMissingLevels();
if(missingLevels > 0){
missingValuePenalty = Math.pow(treeModel.getMissingValuePenalty(), missingLevels);
}
NodeScoreDistribution<V> result = createNodeScoreDistribution(valueFactory, node, missingValuePenalty);
return TargetUtil.evaluateClassification(targetField, result);
}
代码示例来源: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: org.jpmml/pmml-model
value.setPartition(node.getPartition());
if(node.hasScoreDistributions()){
(value.getScoreDistributions()).addAll(node.getScoreDistributions());
代码示例来源:origin: jpmml/jpmml-model
value.setPartition(node.getPartition());
if(node.hasScoreDistributions()){
(value.getScoreDistributions()).addAll(node.getScoreDistributions());
内容来源于网络,如有侵权,请联系作者删除!