当前位置: 首页>>代码示例>>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;未经允许,请勿转载。