本文整理匯總了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());
}
}
}