public class FPGrowth
extends java.lang.Object
implements scala.Serializable
Li et al., PFP: Parallel FP-Growth for Query
Recommendation
. PFP distributes computation in such a way that each worker executes an
independent group of mining tasks. The FP-Growth algorithm is described in
Han et al., Mining frequent patterns without candidate
generation
.
param: minSupport the minimal support level of the frequent pattern, any pattern that appears more than (minSupport * size-of-the-dataset) times will be output param: numPartitions number of partitions used by parallel FP-growth
http://en.wikipedia.org/wiki/Association_rule_learning Association rule learning
(Wikipedia)}
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
FPGrowth.FreqItemset<Item>
Frequent itemset.
|
Constructor and Description |
---|
FPGrowth()
Constructs a default instance with default parameters {minSupport:
0.3 , numPartitions: same
as the input data}. |
Modifier and Type | Method and Description |
---|---|
protected static void |
initializeLogIfNecessary(boolean isInterpreter) |
protected static boolean |
isTraceEnabled() |
protected static org.slf4j.Logger |
log() |
protected static void |
logDebug(scala.Function0<java.lang.String> msg) |
protected static void |
logDebug(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logError(scala.Function0<java.lang.String> msg) |
protected static void |
logError(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logInfo(scala.Function0<java.lang.String> msg) |
protected static void |
logInfo(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static java.lang.String |
logName() |
protected static void |
logTrace(scala.Function0<java.lang.String> msg) |
protected static void |
logTrace(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logWarning(scala.Function0<java.lang.String> msg) |
protected static void |
logWarning(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
<Item,Basket extends java.lang.Iterable<Item>> |
run(JavaRDD<Basket> data)
Java-friendly version of
run . |
<Item> FPGrowthModel<Item> |
run(RDD<java.lang.Object> data,
scala.reflect.ClassTag<Item> evidence$3)
Computes an FP-Growth model that contains frequent itemsets.
|
FPGrowth |
setMinSupport(double minSupport)
Sets the minimal support level (default:
0.3 ). |
FPGrowth |
setNumPartitions(int numPartitions)
Sets the number of partitions used by parallel FP-growth (default: same as input data).
|
public FPGrowth()
0.3
, numPartitions: same
as the input data}.
protected static java.lang.String logName()
protected static org.slf4j.Logger log()
protected static void logInfo(scala.Function0<java.lang.String> msg)
protected static void logDebug(scala.Function0<java.lang.String> msg)
protected static void logTrace(scala.Function0<java.lang.String> msg)
protected static void logWarning(scala.Function0<java.lang.String> msg)
protected static void logError(scala.Function0<java.lang.String> msg)
protected static void logInfo(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logDebug(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logTrace(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logWarning(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logError(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static boolean isTraceEnabled()
protected static void initializeLogIfNecessary(boolean isInterpreter)
public FPGrowth setMinSupport(double minSupport)
0.3
).
minSupport
- (undocumented)public FPGrowth setNumPartitions(int numPartitions)
numPartitions
- (undocumented)public <Item> FPGrowthModel<Item> run(RDD<java.lang.Object> data, scala.reflect.ClassTag<Item> evidence$3)
data
- input data set, each element contains a transactionevidence$3
- (undocumented)FPGrowthModel
public <Item,Basket extends java.lang.Iterable<Item>> FPGrowthModel<Item> run(JavaRDD<Basket> data)
run
.