You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2016/03/25 21:16:25 UTC

[jira] [Updated] (SPARK-14164) Improve input layer validation of MultilayerPerceptronClassifier

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

Dongjoon Hyun updated SPARK-14164:
----------------------------------
    Description: 
This issue improves an input layer validation and adds related testcases to MultilayerPerceptronClassifier.

{code:title=MultilayerPerceptronClassifier.scala|borderStyle=solid}
-    // TODO: how to check ALSO that all elements are greater than 0?
-    ParamValidators.arrayLengthGt(1)
+    (t: Array[Int]) => t.forall(ParamValidators.gt(0)) && t.length > 1
{code}

  was:
This issue improves an input layer validation and related testcases to MultilayerPerceptronClassifier.

{code:title=MultilayerPerceptronClassifier.scala|borderStyle=solid}
-    // TODO: how to check ALSO that all elements are greater than 0?
-    ParamValidators.arrayLengthGt(1)
+    (t: Array[Int]) => t.forall(ParamValidators.gt(0)) && t.length > 1
{code}


> Improve input layer validation of MultilayerPerceptronClassifier
> ----------------------------------------------------------------
>
>                 Key: SPARK-14164
>                 URL: https://issues.apache.org/jira/browse/SPARK-14164
>             Project: Spark
>          Issue Type: Improvement
>          Components: MLlib
>            Reporter: Dongjoon Hyun
>            Priority: Minor
>
> This issue improves an input layer validation and adds related testcases to MultilayerPerceptronClassifier.
> {code:title=MultilayerPerceptronClassifier.scala|borderStyle=solid}
> -    // TODO: how to check ALSO that all elements are greater than 0?
> -    ParamValidators.arrayLengthGt(1)
> +    (t: Array[Int]) => t.forall(ParamValidators.gt(0)) && t.length > 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