You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "yuhao yang (JIRA)" <ji...@apache.org> on 2016/05/05 07:06:13 UTC

[jira] [Comment Edited] (SPARK-14814) ML 2.0 QA: API: Java compatibility, docs

    [ https://issues.apache.org/jira/browse/SPARK-14814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15271988#comment-15271988 ] 

yuhao yang edited comment on SPARK-14814 at 5/5/16 7:06 AM:
------------------------------------------------------------

org.apache.spark.mllib.evaluation.BinaryClassificationMetrics has quite a few java compatibility issues (Nearly all of its methods). [~josephkb], just want to check if this is something we should fix.
{code}
 public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> scoreAndLabels();
  public org.apache.spark.rdd.RDD<java.lang.Object> thresholds();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> roc();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> pr();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> fMeasureByThreshold(double);
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> fMeasureByThreshold();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> precisionByThreshold();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> recallByThreshold();
  public org.apache.spark.mllib.evaluation.BinaryClassificationMetrics(org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>>, int);
  public org.apache.spark.mllib.evaluation.BinaryClassificationMetrics(org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>>);
  public org.apache.spark.mllib.evaluation.MulticlassMetrics(org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>>); 
{code}

updated: 
Similar is the the constructor of RegressionMetrics


was (Author: yuhaoyan):
org.apache.spark.mllib.evaluation.BinaryClassificationMetrics has quite a few java compatibility issues (Nearly all of its methods). [~josephkb], just want to check if this is something we should fix.
{code}
 public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> scoreAndLabels();
  public org.apache.spark.rdd.RDD<java.lang.Object> thresholds();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> roc();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> pr();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> fMeasureByThreshold(double);
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> fMeasureByThreshold();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> precisionByThreshold();
  public org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> recallByThreshold();
  public org.apache.spark.mllib.evaluation.BinaryClassificationMetrics(org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>>, int);
  public org.apache.spark.mllib.evaluation.BinaryClassificationMetrics(org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>>);
  public org.apache.spark.mllib.evaluation.MulticlassMetrics(org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>>); 
{code}

> ML 2.0 QA: API: Java compatibility, docs
> ----------------------------------------
>
>                 Key: SPARK-14814
>                 URL: https://issues.apache.org/jira/browse/SPARK-14814
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Documentation, Java API, ML, MLlib
>            Reporter: Joseph K. Bradley
>            Assignee: yuhao yang
>
> Check Java compatibility for MLlib for this release.
> Checking compatibility means:
> * comparing with the Scala doc
> * verifying that Java docs are not messed up by Scala type incompatibilities.  Some items to look out for are:
> ** Check for generic "Object" types where Java cannot understand complex Scala types.
> *** *Note*: The Java docs do not always match the bytecode. If you find a problem, please verify it using {{javap}}.
> ** Check Scala objects (especially with nesting!) carefully.
> ** Check for uses of Scala and Java enumerations, which can show up oddly in the other language's doc.
> * If needed for complex issues, create small Java unit tests which execute each method.  (The correctness can be checked in Scala.)
> If you find issues, please comment here, or for larger items, create separate JIRAs and link here.
> Note that we should not break APIs from previous releases.  So if you find a problem, check if it was introduced in this Spark release (in which case we can fix it) or in a previous one (in which case we can create a java-friendly version of the API).



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