You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Anu B Nair <an...@gmail.com> on 2017/12/22 07:44:24 UTC
Fwd: [pyspark][MLlib] Getting WARN FPGrowth: Input data is not cached
for cached data
Hi,
Following is my pyspark code, (attached input sample_fpgrowth.txt and
python code along with this mail. Even after I have done cache, I am
getting Warning: Input data is not cached.
*from pyspark.mllib.fpm import FPGrowthimport pysparkfrom pyspark.context
import SparkContextfrom pyspark.sql.session import SparkSessionsc =
SparkContext('local')data = sc.textFile("sample_fpgrowth.txt")transactions
= data.map(lambda line: line.strip().split(' ')).cache()model =
FPGrowth.train(transactions, minSupport=0.2, numPartitions=10)result =
model.freqItemsets().collect()print(result)*
Understood that it is a warning, but just wanted to know in detail
--
Anu