How to input initial centroids to K-Means or GMM Clustering in SparkML ?

HariK1
New Contributor II

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.