You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Peter Rudenko (JIRA)" <ji...@apache.org> on 2015/04/14 16:46:12 UTC

[jira] [Updated] (SPARK-6901) ParamGridBuilder.build with no grids should return an empty array

     [ https://issues.apache.org/jira/browse/SPARK-6901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Rudenko updated SPARK-6901:
---------------------------------
    Description: 
ParamGridBuilder.build with no grids returns array with an empty param map. 
{code}
(new ParamGridBuilder).build().size == 1
{code}

I have a logic if ParamGridBuilder is empty - then not use CrossValidator. It confuses because if the ParamGridBuilder has one grid it will also return an array of size 1:
{code}
(new ParamGridBuilder).addGrid(lr.regParam, Array(0.1)).build().size == 1
{code}

  was:
ParamGridBuilder.build with no grids returns array with an empty param map. 
{code}
(new ParamGridBuilder).build().size == 1
{code}

I have a logic if ParamGridBuilder is empty - then not use CrossValidator. Currently have to compare with 1 which is not very obvious. Better would be:
{code}
(new ParamGridBuilder).build().isEmpty
{code}



> ParamGridBuilder.build with no grids should return an empty array
> -----------------------------------------------------------------
>
>                 Key: SPARK-6901
>                 URL: https://issues.apache.org/jira/browse/SPARK-6901
>             Project: Spark
>          Issue Type: Bug
>          Components: ML
>    Affects Versions: 1.3.0
>            Reporter: Peter Rudenko
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> ParamGridBuilder.build with no grids returns array with an empty param map. 
> {code}
> (new ParamGridBuilder).build().size == 1
> {code}
> I have a logic if ParamGridBuilder is empty - then not use CrossValidator. It confuses because if the ParamGridBuilder has one grid it will also return an array of size 1:
> {code}
> (new ParamGridBuilder).addGrid(lr.regParam, Array(0.1)).build().size == 1
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org