public class FrequentItemset extends Object
Each basket consists of a set of items (an itemset). A set (or subset) of items that appears in many baskets is considered 'frequent'.
Constructor and Description |
---|
FrequentItemset(IntColumn sets,
CategoryColumn items,
double support) |
FrequentItemset(IntColumn sets,
IntColumn items,
double supportThreshold)
Constructs and returns a frequent itemset model
|
FrequentItemset(ShortColumn sets,
CategoryColumn items,
double support) |
FrequentItemset(ShortColumn sets,
ShortColumn items,
double support) |
Modifier and Type | Method and Description |
---|---|
it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap<it.unimi.dsi.fastutil.ints.IntRBTreeSet> |
confidenceMap()
Returns a map of associations and their confidence, where confidence is support for the itemset (that is, the
number of times it appears in the input data) divided by the total number of sets (i.e., the percentage of input
sets where it appears.
|
it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap<it.unimi.dsi.fastutil.ints.IntRBTreeSet> |
confidenceMap(double supportThreshold)
Returns a map of associations and their confidence, where confidence is support for the itemset (that is, the
number of times it appears in the input data) divided by the total number of sets (i.e., the percentage of input
sets where it appears.
|
List<smile.association.ItemSet> |
learn()
Returns a list of ItemSet objects, where each itemset consists of a list of the items that were found together,
plus the raw support for the itemset: the number of sets in which the combination appeared in the data
given to the model
|
it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<int[]> |
supportMap()
Returns a map of discovered ItemSets and their support, where the support is the number of times the combination
appears in the input data
|
it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap<int[]> |
supportMap(int supportThreshold)
Returns a map of discovered ItemSets and their support, where the support is the number of times the combination
appears in the input data.
|
public FrequentItemset(IntColumn sets, IntColumn items, double supportThreshold)
sets
- items
- supportThreshold
- the minimum support required to be includedpublic FrequentItemset(IntColumn sets, CategoryColumn items, double support)
public FrequentItemset(ShortColumn sets, CategoryColumn items, double support)
public FrequentItemset(ShortColumn sets, ShortColumn items, double support)
public List<smile.association.ItemSet> learn()
public it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<int[]> supportMap()
public it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap<int[]> supportMap(int supportThreshold)
public it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap<it.unimi.dsi.fastutil.ints.IntRBTreeSet> confidenceMap()
public it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap<it.unimi.dsi.fastutil.ints.IntRBTreeSet> confidenceMap(double supportThreshold)
The map returned includes only those itemsets for which the confidence is above the given threshold
Copyright © 2017. All rights reserved.