GitHub user petro-rudenko opened a pull request:

    https://github.com/apache/spark/pull/5510

    [SPARK-6901][Ml]ParamGridBuilder.build with no grids should return an emty 
array

    ParamGridBuilder.build with no grids returns array with an empty param map.
    ```scala
    assert((new ParamGridBuilder).build().size == 1)
    ```
    I have a logic if ParamGridBuilder is empty - then not use CrossValidator. 
It confuses because if the ParamGridBuilder has one grid point in it will also 
return an array of size 1:
    ```scala
    assert((new ParamGridBuilder).addGrid(lr.regParam, Array(0.1)).build().size 
== 1)
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/petro-rudenko/spark SPARK-6901

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/5510.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5510
    
----
commit 742bd209c7fd5fc82c65a86a1b28de2470db018b
Author: Peter Rudenko <[email protected]>
Date:   2015-04-14T15:12:22Z

    [SPARK-6901][Ml]ParamGridBuilder.build with no grids should return an empty 
array

----


---
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]

Reply via email to