本文整理汇总了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 "";
}
}
}
示例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;
}
示例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;
}
示例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();
}
示例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 "";
}
}
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}