Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/17117#discussion_r104821332
--- Diff: mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala
---
@@ -335,17 +369,70 @@ class KMeans @Since("1.5.0") (
model
}
+ /**
+ * Check validity for interactions between parameters.
+ */
+ private def assertInitialModelValid(): Unit = {
--- End diff --
I think with overwriting above, the only thing we need to check will be
```scala
if ($(initMode) == MLlibKMeans.K_MEANS_INITIAL_MODEL &&
!isSet(initialModel)) {
throw new IllegalArgumentException("Users must set param initialModel if
you choose " +
"'initialModel' as the initialization.")
}
```
we can just have it in the body of `fit` method.
---
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]