本文整理了Java中org.dmg.pmml.tree.Node.getRecordCount()
方法的一些代码示例,展示了Node.getRecordCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getRecordCount()
方法的具体详情如下:
包路径:org.dmg.pmml.tree.Node
类名称:Node
方法名:getRecordCount
暂无
代码示例来源:origin: OryxProject/oryx
} else {
prediction = new NumericPrediction(Double.parseDouble(root.getScore()),
(int) Math.round(root.getRecordCount()));
代码示例来源:origin: OryxProject/oryx
@Test
public void testReadWrite() throws Exception {
Path tempModelFile = Files.createTempFile(getTempDir(), "model", ".pmml");
PMML model = buildDummyModel();
PMMLUtils.write(model, tempModelFile);
assertTrue(Files.exists(tempModelFile));
PMML model2 = PMMLUtils.read(tempModelFile);
List<Model> models = model2.getModels();
assertEquals(1, models.size());
assertInstanceOf(models.get(0), TreeModel.class);
TreeModel treeModel = (TreeModel) models.get(0);
assertEquals(123.0, treeModel.getNode().getRecordCount().doubleValue());
assertEquals(MiningFunction.CLASSIFICATION, treeModel.getMiningFunction());
}
代码示例来源:origin: OryxProject/oryx
Node leftChild = children.get(1);
assertInstanceOf(leftChild.getPredicate(), True.class);
assertEquals(node.getRecordCount().doubleValue(),
leftChild.getRecordCount() + rightChild.getRecordCount());
assertEquals(node.getId() + "+", rightChild.getId());
assertEquals(node.getId() + "-", leftChild.getId());
代码示例来源:origin: jpmml/jpmml-evaluator
@Override
public int compare(Node left, Node right){
return this.ordering.compare(left.getRecordCount(), right.getRecordCount());
}
};
代码示例来源:origin: org.jpmml/pmml-evaluator-extension
@Override
public int compare(Node left, Node right){
return this.ordering.compare(left.getRecordCount(), right.getRecordCount());
}
};
代码示例来源:origin: jpmml/jpmml-evaluator
@Override
public VisitorAction visit(Node node){
Deque<PMMLObject> parents = getParents();
int depth = 0;
Iterator<PMMLObject> it = parents.iterator();
while(true){
PMMLObject parent = it.next();
if(parent instanceof Node){
depth++;
continue;
}
TreeModel treeModel = (TreeModel)parent;
Segment segment = (Segment)it.next();
Double recordCount = node.getRecordCount();
if(recordCount == null){
recordCount = 0d;
}
printRow(segment.getId(), node.getId(), recordCount, depth);
break;
}
return super.visit(node);
}
代码示例来源:origin: jpmml/jpmml-lightgbm
@Override
public void exitNode(Node node){
Double recordCount = node.getRecordCount();
Predicate predicate = node.getPredicate();
if(recordCount != null){
node.setRecordCount(null);
} // End if
if(predicate instanceof True){
Node parentNode = getParentNode();
if(parentNode == null){
return;
}
initScore(parentNode, node);
replaceChildWithGrandchildren(parentNode, node);
}
}
代码示例来源:origin: com.cloudera.oryx/oryx-app-common
} else {
prediction = new NumericPrediction(Double.parseDouble(root.getScore()),
(int) Math.round(root.getRecordCount()));
代码示例来源: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-evaluator
Double recordCount = node.getRecordCount();
代码示例来源:origin: jpmml/jpmml-model
value.setRecordCount(node.getRecordCount());
value.setDefaultChild(node.getDefaultChild());
代码示例来源:origin: org.jpmml/pmml-model
value.setRecordCount(node.getRecordCount());
value.setDefaultChild(node.getDefaultChild());
内容来源于网络,如有侵权,请联系作者删除!