You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2018/12/28 14:07:02 UTC
[GitHub] srowen commented on a change in pull request #23144:
[SPARK-26172][ML][WIP] Unify String Params' case-insensitivity in ML
srowen commented on a change in pull request #23144: [SPARK-26172][ML][WIP] Unify String Params' case-insensitivity in ML
URL: https://github.com/apache/spark/pull/23144#discussion_r244326270
##########
File path: mllib/src/main/scala/org/apache/spark/ml/param/params.scala
##########
@@ -524,6 +525,65 @@ class BooleanParam(parent: String, name: String, doc: String) // No need for isV
}
}
+/**
+ * :: DeveloperApi ::
+ * Specialized version of `Param[String]` for Java.
+ */
+@DeveloperApi
Review comment:
I see, this is added not because it's a specialization for Java, but to add the `normalize` function. How about instead overriding `value` with the normalized version? then you don't specialize `ParamPair`.
I'm wondering whether it makes sense to add `normalize` to all Params. I guess not as there's no such thing as normalizing a boolean or double.
If these `Param[String]` have to become a `StringParam` with a normalization function, does this save much versus simply normalizing the value where it's accessed or maybe just only accepting the lower-cased string, for consistency (and adding a few new validator helper methods)?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org