How to input initial centroids to K-Means or GMM Clustering in SparkML ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 08:36 AM
Hi, I want to use KMeans Model or Gaussian Mixture Model algorithm for clustering using the SparkML library, in which I want to specify the initial centroids. The option of giving initial centroids is there in the Spark MLlib (RDD based APIs) however not available in the Pyspark DataFrame based APIs (SparkML). Since Spark MLlib is in the maintenance mode, I do not want to use it and instead use SaprkML library. Is anyone knows a workaround? Thank You.
- Labels:
-
Clustering
-
K-means
-
SparkML Models
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 06:39 AM
Hi @Kaniz Fatma , thanks for your response. Since MLlib is currently in the maintenance mode we don't want to use it in production and hence want to use SparkML (data frame based APIs). Here is the problem. In SparkML libraries there is no mention of how to input user specified centroids for K-Means or GMM. That was my question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 07:52 AM
@Kaniz Fatma I still haven't got an answer to my question!!!
![](/skins/images/582998B45490C7019731A5B3A872C751/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/582998B45490C7019731A5B3A872C751/responsive_peak/images/icon_anonymous_message.png)