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

    https://github.com/apache/spark/pull/6087#discussion_r30195886
  
    --- Diff: python/pyspark/mllib/clustering.py ---
    @@ -166,12 +166,39 @@ class GaussianMixtureModel(object):
         True
         >>> labels[3]==labels[4]
         True
    +    >>> clusterdata_3 = sc.parallelize([[-5.1971], [-2.5359], [-3.8220],
    +    ...                                 [-5.2211], [-5.0602],  [4.7118],
    +    ...                                 [6.8989], [3.4592],  [4.6322],
    +    ...                                 [5.7048],  [4.6567], [5.5026],
    +    ...                                 [4.5605],  [5.2043],  [6.2734]])
    +    >>> im = GaussianMixtureModel([0.5, 0.5],
    +    ...      [MultivariateGaussian(Vectors.dense([-1.0]), DenseMatrix(1, 
1, [1.0])),
    +    ...      MultivariateGaussian(Vectors.dense([1.0]), DenseMatrix(1, 1, 
[1.0]))])
    +    >>> model = GaussianMixture.train(clusterdata_3, 2, initialModel=im)
    +    >>> model.weights
    --- End diff --
    
    Testing the learned model like this does not look that robust.  I'm mainly 
concerned about the code running, so it should be fine to remove this line and 
the 3 below it.


---
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