Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/20146#discussion_r162715788
--- Diff: mllib/src/main/scala/org/apache/spark/ml/param/params.scala ---
@@ -249,6 +249,16 @@ object ParamValidators {
def arrayLengthGt[T](lowerBound: Double): Array[T] => Boolean = {
(value: Array[T]) =>
value.length > lowerBound
}
+
+ /** Check if more than one param in a set of exclusive params are set. */
+ def checkExclusiveParams(model: Params, params: String*): Unit = {
+ if (params.filter(paramName => model.hasParam(paramName) &&
--- End diff --
Why is this checking to see if the Param belongs to the Model? If this
method is called with irrelevant Params, shouldn't it throw an error?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]