FPGrowth (Spark 3.5.5 JavaDoc) (original) (raw)
Object
- org.apache.spark.mllib.fpm.FPGrowth
All Implemented Interfaces:
java.io.Serializable, org.apache.spark.internal.Logging
public class FPGrowth
extends Object
implements org.apache.spark.internal.Logging, scala.Serializable
See Also:
Association rule learning (Wikipedia)
, Serialized Form
Nested Class Summary
Nested Classes
Modifier and Type Class and Description static class FPGrowth.FreqItemset<Item> Frequent itemset. * ### Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging `org.apache.spark.internal.Logging.SparkShellLoggingFilter`
Constructor Summary
Constructors
Constructor and Description FPGrowth() Constructs a default instance with default parameters {minSupport: 0.3, numPartitions: same as the input data}. Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method and Description <Item,Basket extends Iterable>FPGrowthModel run(JavaRDD data) Java-friendly version of run. FPGrowthModel run(RDD data, scala.reflect.ClassTag evidence$4) 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). * ### Methods inherited from class Object `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait` * ### Methods inherited from interface org.apache.spark.internal.Logging `$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize`
Constructor Detail
* #### FPGrowth public FPGrowth() Constructs a default instance with default parameters {minSupport: `0.3`, numPartitions: same as the input data}.
Method Detail
* #### setMinSupport public [FPGrowth](../../../../../org/apache/spark/mllib/fpm/FPGrowth.html "class in org.apache.spark.mllib.fpm") setMinSupport(double minSupport) Sets the minimal support level (default: `0.3`). Parameters: `minSupport` \- (undocumented) Returns: (undocumented) * #### setNumPartitions public [FPGrowth](../../../../../org/apache/spark/mllib/fpm/FPGrowth.html "class in org.apache.spark.mllib.fpm") setNumPartitions(int numPartitions) Sets the number of partitions used by parallel FP-growth (default: same as input data). Parameters: `numPartitions` \- (undocumented) Returns: (undocumented) * #### run public <Item> [FPGrowthModel](../../../../../org/apache/spark/mllib/fpm/FPGrowthModel.html "class in org.apache.spark.mllib.fpm")<Item> run([RDD](../../../../../org/apache/spark/rdd/RDD.html "class in org.apache.spark.rdd")<Object> data, scala.reflect.ClassTag<Item> evidence$4) Computes an FP-Growth model that contains frequent itemsets. Parameters: `data` \- input data set, each element contains a transaction `evidence$4` \- (undocumented) Returns: an [FPGrowthModel](../../../../../org/apache/spark/mllib/fpm/FPGrowthModel.html "class in org.apache.spark.mllib.fpm") * #### run public <Item,Basket extends Iterable<Item>> [FPGrowthModel](../../../../../org/apache/spark/mllib/fpm/FPGrowthModel.html "class in org.apache.spark.mllib.fpm")<Item> run([JavaRDD](../../../../../org/apache/spark/api/java/JavaRDD.html "class in org.apache.spark.api.java")<Basket> data) Java-friendly version of `run`. Parameters: `data` \- (undocumented) Returns: (undocumented)