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


Java FrequentItemSet類代碼示例

本文整理匯總了Java中com.rapidminer.operator.learner.associations.FrequentItemSet的典型用法代碼示例。如果您正苦於以下問題:Java FrequentItemSet類的具體用法?Java FrequentItemSet怎麽用?Java FrequentItemSet使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FrequentItemSet類屬於com.rapidminer.operator.learner.associations包,在下文中一共展示了FrequentItemSet類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getValueAt

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
	FrequentItemSet itemSet = frequentSets.getItemSet(this.mapping[rowIndex]);
	if (columnIndex == COLUMN_SIZE) {
		return itemSet.getItems().size();
	} else if (columnIndex == COLUMN_SUPPORT) {
		return Tools.formatNumber((double) itemSet.getFrequency() / (double) frequentSets.getNumberOfTransactions());
	} else {
		int actualIndex = columnIndex - 2;
		if (actualIndex < itemSet.getNumberOfItems()) {
			return itemSet.getItem(actualIndex).toString();
		} else {
			return "";
		}
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:17,代碼來源:FrequentItemSetsTableModel.java

示例2: acceptItemSet

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
private boolean acceptItemSet(FrequentItemSet itemSet, int min, int max, String[] itemNames) {
	int size = itemSet.getNumberOfItems();
	if (size < min) {
		return false;
	}
	if (size > max) {
		return false;
	}

	if ((itemNames == null) || (itemNames.length == 0)) {
		return true;
	}

	for (Item item : itemSet.getItems()) {
		for (String itemName : itemNames) {
			if (item.toString().contains(itemName)) {
				return true;
			}
		}
	}
	return false;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:23,代碼來源:FrequentItemSetsTableModel.java

示例3: acceptItemSet

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
private boolean acceptItemSet(FrequentItemSet itemSet, int min, int max, String[] itemNames) {
    int size = itemSet.getNumberOfItems();
    if (size < min)
        return false;
    if (size > max)
        return false;
    
    if ((itemNames == null) || (itemNames.length == 0))
        return true;
    
    for (Item item : itemSet.getItems()) {
        for (String itemName : itemNames)
            if (item.toString().contains(itemName))
                return true;
    }
    return false;
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:18,代碼來源:FrequentItemSetsTableModel.java

示例4: updateFilter

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
public void updateFilter(int min, int max, String itemName) {
	List<Integer> indices = new LinkedList<Integer>();
	int index = 0;
	this.maxItemSetSize = 0;
	String[] itemNames = null;
	if (itemName != null) {
		itemNames = itemName.split(",");
		for (int i = 0; i < itemNames.length; i++) {
			itemNames[i] = itemNames[i].trim();
		}
	}

	for (FrequentItemSet itemSet : frequentSets) {
		if (acceptItemSet(itemSet, min, max, itemNames)) {
			indices.add(index);
			this.maxItemSetSize = Math.max(this.maxItemSetSize, itemSet.getNumberOfItems());
		}
		index++;
	}

	this.mapping = new int[indices.size()];
	int counter = 0;
	for (int c : indices) {
		this.mapping[counter++] = c;
	}
	fireTableStructureChanged();
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:28,代碼來源:FrequentItemSetsTableModel.java

示例5: getValueAt

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
public Object getValueAt(int rowIndex, int columnIndex) {
    FrequentItemSet itemSet = frequentSets.getItemSet(this.mapping[rowIndex]);
    if (columnIndex == COLUMN_SIZE) {
        return itemSet.getItems().size();
    } else if (columnIndex == COLUMN_SUPPORT) {
        return Tools.formatNumber((double)itemSet.getFrequency() / (double)frequentSets.getNumberOfTransactions());
    } else {
        int actualIndex = columnIndex - 2;
        if (actualIndex < itemSet.getNumberOfItems()) {
            return itemSet.getItem(actualIndex).toString();
        } else {
            return "";
        }
    }
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:16,代碼來源:FrequentItemSetsTableModel.java

示例6: updateFilter

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
public void updateFilter(int min, int max, String itemName) {
    List<Integer> indices = new LinkedList<Integer>();
    int index = 0;
    this.maxItemSetSize = 0;
    String[] itemNames = null;
    if (itemName != null) {
        itemNames = itemName.split(",");
        for (int i = 0; i < itemNames.length; i++)
        	itemNames[i] = itemNames[i].trim();
    }

    
    for (FrequentItemSet itemSet : frequentSets) {
        if (acceptItemSet(itemSet, min, max, itemNames)) {
            indices.add(index);
            this.maxItemSetSize = Math.max(this.maxItemSetSize, itemSet.getNumberOfItems());
        }
        index++;
    }
    
    this.mapping = new int[indices.size()];
    int counter = 0;
    for (int c : indices) {
        this.mapping[counter++] = c;
    }
    fireTableStructureChanged();
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:28,代碼來源:FrequentItemSetsTableModel.java

示例7: mineTree

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
private void mineTree(FPTree tree, FrequentItemSets sets, int recursionDepth, int minTotalSupport, int maxItems)
		throws ProcessStoppedException {
	mineTree(tree, sets, recursionDepth, new FrequentItemSet(), minTotalSupport, maxItems);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:5,代碼來源:FPGrowth.java

示例8: mineTree

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
private void mineTree(FPTree tree, FrequentItemSets sets, int recursionDepth, FrequentItemSet conditionalItems,
		int minTotalSupport, int maxItems) throws ProcessStoppedException {
	mineTree(tree, sets, recursionDepth, conditionalItems, minTotalSupport, maxItems, false);
}
 
開發者ID:rapidminer,項目名稱:rapidminer-studio,代碼行數:5,代碼來源:FPGrowth.java

示例9: mineTree

import com.rapidminer.operator.learner.associations.FrequentItemSet; //導入依賴的package包/類
private void mineTree(FPTree tree, FrequentItemSets sets, int recursionDepth, int minTotalSupport, int maxItems) throws ProcessStoppedException {
	mineTree(tree, sets, recursionDepth, new FrequentItemSet(), minTotalSupport, maxItems);
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:4,代碼來源:FPGrowth.java


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