You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Nassir (JIRA)" <ji...@apache.org> on 2017/06/28 15:24:00 UTC

[jira] [Updated] (SPARK-21244) KMeans applied to processed text day clumps almost all documents into one cluster

     [ https://issues.apache.org/jira/browse/SPARK-21244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nassir updated SPARK-21244:
---------------------------
    Description: 
I have observed this problem for quite a while now regarding the implementation of pyspark KMeans on text documents - to cluster documents according to their TF-IDF vectors. The pyspark implementation - even on standard datasets - clusters almost all of the documents into one cluster. 

I implemented K-means on the same dataset with same parameters using SKlearn library, and this clusters the documents very well. 

I recommend anyone who is able to test the pyspark implementation of KMeans on text documents - which obviously has a bug in it somewhere.

(currently I am convert my spark dataframe to pandas dataframe and running k means and converting back. However, this is of course not a parallel solution capable of handling huge amounts of data in future)

Here is a link to the question i posted a while back on stackoverlfow: https://stackoverflow.com/questions/43863373/tf-idf-document-clustering-with-k-means-in-apache-spark-putting-points-into-one

  was:
I have observed this problem for quite a while now regarding the implementation of pyspark KMeans on text documents - to cluster documents according to their TF-IDF vectors. The pyspark implementation - even on standard datasets - clusters almost all of the documents into one cluster. 

I implemented K-means on the same dataset with same parameters using SKlearn library, and this clusters the documents very well. 

I recommend anyone who is able to test the pyspark implementation of KMeans on text documents - which obviously has a bug in it somewhere.

(currently I am convert my spark dataframe to pandas dataframe and running k means and converting back. However, this is of course not a parallel solution capable of handling huge amounts of data in future)


> KMeans applied to processed text day clumps almost all documents into one cluster
> ---------------------------------------------------------------------------------
>
>                 Key: SPARK-21244
>                 URL: https://issues.apache.org/jira/browse/SPARK-21244
>             Project: Spark
>          Issue Type: Bug
>          Components: ML
>    Affects Versions: 2.1.1
>            Reporter: Nassir
>
> I have observed this problem for quite a while now regarding the implementation of pyspark KMeans on text documents - to cluster documents according to their TF-IDF vectors. The pyspark implementation - even on standard datasets - clusters almost all of the documents into one cluster. 
> I implemented K-means on the same dataset with same parameters using SKlearn library, and this clusters the documents very well. 
> I recommend anyone who is able to test the pyspark implementation of KMeans on text documents - which obviously has a bug in it somewhere.
> (currently I am convert my spark dataframe to pandas dataframe and running k means and converting back. However, this is of course not a parallel solution capable of handling huge amounts of data in future)
> Here is a link to the question i posted a while back on stackoverlfow: https://stackoverflow.com/questions/43863373/tf-idf-document-clustering-with-k-means-in-apache-spark-putting-points-into-one



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org