public class FPGrowthModel<Item> extends Object implements Saveable, scala.Serializable
FPGrowth
, which holds frequent itemsets.
param: freqItemsets frequent itemset, which is an RDD of FreqItemset
Modifier and Type | Class and Description |
---|---|
static class |
FPGrowthModel.SaveLoadV1_0$ |
Constructor and Description |
---|
FPGrowthModel(RDD<FPGrowth.FreqItemset<Item>> freqItemsets,
scala.reflect.ClassTag<Item> evidence$1) |
Modifier and Type | Method and Description |
---|---|
RDD<FPGrowth.FreqItemset<Item>> |
freqItemsets() |
RDD<AssociationRules.Rule<Item>> |
generateAssociationRules(double confidence)
Generates association rules for the
Item s in freqItemsets . |
static FPGrowthModel<?> |
load(SparkContext sc,
String path) |
void |
save(SparkContext sc,
String path)
Save this model to the given path.
|
public FPGrowthModel(RDD<FPGrowth.FreqItemset<Item>> freqItemsets, scala.reflect.ClassTag<Item> evidence$1)
public static FPGrowthModel<?> load(SparkContext sc, String path)
public RDD<FPGrowth.FreqItemset<Item>> freqItemsets()
public RDD<AssociationRules.Rule<Item>> generateAssociationRules(double confidence)
Item
s in freqItemsets
.confidence
- minimal confidence of the rules producedpublic void save(SparkContext sc, String path)
This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/
The model may be loaded using FPGrowthModel.load
.