Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8967#discussion_r41430454
  
    --- Diff: python/pyspark/mllib/clustering.py ---
    @@ -144,10 +150,16 @@ class KMeans(object):
     
         @classmethod
         def train(cls, rdd, k, maxIterations=100, runs=1, 
initializationMode="k-means||",
    -              seed=None, initializationSteps=5, epsilon=1e-4):
    +              seed=None, initializationSteps=5, epsilon=1e-4, 
initialModel=None):
             """Train a k-means clustering model."""
    +        clusterInitialModel = []
    +        if initialModel is not None:
    +            if not isinstance(initialModel, KMeansModel):
    +                raise Exception("initialModel needs to be of type 
KMeansModel")
    --- End diff --
    
    Please state what the bad type is in the error: ```type(initialModel)```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to