Class AssociationRules

Object
org.apache.spark.ml.fpm.AssociationRules

public class AssociationRules extends Object
  • 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 like FPGrowth.
      itemsCol - column name for frequent itemsets
      freqCol - column name for appearance count of the frequent itemsets
      minConfidence - minimum confidence for generating the association rules
      itemSupport - map containing an item and its support
      numTrainingRecords - count of training Dataset
      evidence$2 - (undocumented)
      Returns:
      a DataFrame("antecedent"[Array], "consequent"[Array], "confidence"[Double], "lift" [Double]) containing the association rules.