Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/17117#discussion_r104090273
--- Diff: mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala
---
@@ -337,15 +366,61 @@ class KMeans @Since("1.5.0") (
@Since("1.5.0")
override def transformSchema(schema: StructType): StructType = {
+ if ($(initMode) == MLlibKMeans.K_MEANS_INITIAL_MODEL) {
--- End diff --
It might be nice to factor this logic out into a method like
`assertInitialModelValid` or something similar. Actually, we could add an
abstract method to the `HasInitialModel` trait that each subclass can implement
differently.
---
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]