當前位置: 首頁>>代碼示例>>Java>>正文


Java Node.setPartitionId方法代碼示例

本文整理匯總了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());
		}
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:16,代碼來源:HierarchicalMultiClassLearner.java

示例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());
		}
	}
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:15,代碼來源:HierarchicalMultiClassLearner.java


注:本文中的com.rapidminer.operator.learner.meta.HierarchicalMultiClassModel.Node.setPartitionId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。