本文整理汇总了Java中com.rapidminer.operator.learner.meta.HierarchicalMultiClassModel.Node.setPartitionId方法的典型用法代码示例。如果您正苦于以下问题:Java Node.setPartitionId方法的具体用法?Java Node.setPartitionId怎么用?Java Node.setPartitionId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.operator.learner.meta.HierarchicalMultiClassModel.Node
的用法示例。
在下文中一共展示了Node.setPartitionId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setParitionIdRecursivly
import com.rapidminer.operator.learner.meta.HierarchicalMultiClassModel.Node; //导入方法依赖的package包/类
/**
* This will set the partition id by either taking the mapping value of the original label
* mapping if the node is a leaf, or the next free integer available after the highest entry in
* the mapping.
*/
private void setParitionIdRecursivly(Node node, AtomicInteger nonLeafCounter, int maxLeafId, Attribute workingLabel) {
if (node.isLeaf()) {
node.setPartitionId(workingLabel.getMapping().mapString(node.getClassName()));
} else {
for (Node child : node.getChildren()) {
setParitionIdRecursivly(child, nonLeafCounter, maxLeafId, workingLabel);
node.setPartitionId(nonLeafCounter.incrementAndGet());
}
}
}
示例2: setParitionIdRecursivly
import com.rapidminer.operator.learner.meta.HierarchicalMultiClassModel.Node; //导入方法依赖的package包/类
/**
* This will set the partition id by either taking the mapping value of the original label mapping if the node is a leaf,
* or the next free integer available after the highest entry in the mapping.
*/
private void setParitionIdRecursivly(Node node, AtomicInteger nonLeafCounter, int maxLeafId, Attribute workingLabel) {
if (node.isLeaf()) {
node.setPartitionId(workingLabel.getMapping().mapString(node.getClassName()));
} else {
for (Node child: node.getChildren()) {
setParitionIdRecursivly(child, nonLeafCounter, maxLeafId, workingLabel);
node.setPartitionId(nonLeafCounter.incrementAndGet());
}
}
}