Package org.apache.spark.ml.fpm
Class AssociationRules
Object
org.apache.spark.ml.fpm.AssociationRules
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAssociationRulesFromFP
(Dataset<?> dataset, String itemsCol, String freqCol, double minConfidence, scala.collection.Map<T, Object> itemSupport, long numTrainingRecords, scala.reflect.ClassTag<T> evidence$2) Computes the association rules with confidence above minConfidence.
-
Constructor Details
-
AssociationRules
public AssociationRules()
-
-
Method Details
-
getAssociationRulesFromFP
public static <T> Dataset<Row> getAssociationRulesFromFP(Dataset<?> dataset, String itemsCol, String freqCol, double minConfidence, scala.collection.Map<T, Object> itemSupport, long numTrainingRecords, scala.reflect.ClassTag<T> evidence$2) Computes the association rules with confidence above minConfidence.- Parameters:
dataset
- DataFrame("items"[Array], "freq"[Long]) containing frequent itemsets obtained from algorithms likeFPGrowth
.itemsCol
- column name for frequent itemsetsfreqCol
- column name for appearance count of the frequent itemsetsminConfidence
- minimum confidence for generating the association rulesitemSupport
- map containing an item and its supportnumTrainingRecords
- count of training Datasetevidence$2
- (undocumented)- Returns:
- a DataFrame("antecedent"[Array], "consequent"[Array], "confidence"[Double], "lift" [Double]) containing the association rules.
-