【发布时间】:2017-03-17 07:30:54
【问题描述】:
不知道为什么会收到这条消息
WARN KMeans: The input data is not directly cached, which may hurt performance if its parent RDDs are also uncached.
当我尝试使用 Spark KMeans
df_Part = assembler.transform(df_Part)
df_Part.cache()
while (k<=max_cluster) and (wssse > seuilStop):
kmeans = KMeans().setK(k)
model = kmeans.fit(df_Part)
wssse = model.computeCost(df_Part)
k=k+1
它说我的输入(数据帧)没有被缓存!!
我尝试打印 df_Part.is_cached 并收到 True,这意味着我的数据帧已缓存,那么为什么 Spark 仍然会警告我呢?
【问题讨论】:
标签: python apache-spark pyspark apache-spark-sql k-means