Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/5510#discussion_r28338583
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/tuning/ParamGridBuilder.scala ---
@@ -100,10 +100,11 @@ class ParamGridBuilder {
* Builds and returns all combinations of parameters specified by the
param grid.
*/
def build(): Array[ParamMap] = {
- var paramMaps = Array(new ParamMap)
+ var paramMaps = Array.empty[ParamMap]
--- End diff --
Maybe simpler just to check `values.isEmpty` at the outset?
Not really related, but I don't see why the loop needs an extra
`newParamMaps` variable.
---
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]