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

Yanbo Liang updated SPARK-15605:
--------------------------------
    Description: 
This bug is reported by
http://apache-spark-developers-list.1001551.n3.nabble.com/Creation-of-SparkML-Estimators-in-Java-broken-td17710.html
 .

I found we only implement JavaParams who is the wrappers of Scala Params.
We still need Java-friendly wrappers for other traits who extends from Scala 
Params.

For example, in Scala we have: 
    trait HasLabelCol extends Params
We should have the Java-friendly wrappers as follows:
    class JavaHasLabelCol extends Params

Otherwise, "Param.parent" will be null for each param and it will throw 
exceptions when calling "Param.hasParam()".
I think the Java compatibility for Params/Param should be further defined, and 
it's better to remove the "JavaDeveloperApiExample" which will mislead users.

  was:
This bug is reported by
http://apache-spark-developers-list.1001551.n3.nabble.com/Creation-of-SparkML-Estimators-in-Java-broken-td17710.html
 .

I found we only implement JavaParams who is the wrappers of Scala Params.
We still need Java-friendly wrappers for other traits who extends from Scala 
Params.

For example, in Scala we have: 
    trait HasLabelCol extends Params
We should have the Java-friendly wrappers as follows:
    class JavaHasLabelCol extends Params

Otherwise, "Param.parent" will be null for each param and it will throw 
exceptions when calling "Param.hasParam()".
I think the Java compatibility for Params/Param should be further defined, and 
it's better to remove the ""


> ML JavaDeveloperApiExample is broken
> ------------------------------------
>
>                 Key: SPARK-15605
>                 URL: https://issues.apache.org/jira/browse/SPARK-15605
>             Project: Spark
>          Issue Type: Bug
>          Components: Examples, ML
>            Reporter: Yanbo Liang
>            Priority: Minor
>
> This bug is reported by
> http://apache-spark-developers-list.1001551.n3.nabble.com/Creation-of-SparkML-Estimators-in-Java-broken-td17710.html
>  .
> I found we only implement JavaParams who is the wrappers of Scala Params.
> We still need Java-friendly wrappers for other traits who extends from Scala 
> Params.
> For example, in Scala we have: 
>     trait HasLabelCol extends Params
> We should have the Java-friendly wrappers as follows:
>     class JavaHasLabelCol extends Params
> Otherwise, "Param.parent" will be null for each param and it will throw 
> exceptions when calling "Param.hasParam()".
> I think the Java compatibility for Params/Param should be further defined, 
> and it's better to remove the "JavaDeveloperApiExample" which will mislead 
> users.



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

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

Reply via email to