How to limit FPGrowth itemesets to just 2 or 3
问题 I am running the FPGrowth algorithm using pyspark in python3.6 using jupyter notebook. When I am trying to save the association rules output of rules generated is huge. So I want to limit the number of consequent. Here is the code which I have tried. I also changed the spark context parameters. Maximum Pattern Length fpGrowth (Apache) PySpark from pyspark.sql.functions import col, size from pyspark.ml.fpm import FPGrowth from pyspark.sql import Row from pyspark.context import SparkContext