Github user zapletal-martin commented on the pull request:

    https://github.com/apache/spark/pull/3519#issuecomment-68279092
  
    1) Can you please clarify if you are sugesting to use RDD[(Double, Double, 
Double)] - i.e label, feature, weight or RDD[(Double, Double)] - i.e. just 
label, weight and already expect the data to be ordered? Also I assume there 
should be API with weight default to 1 (so user does not have to specify it).
    
    2) IsotonicRegressionModel extends RegressionModel. It implements methods 
predict(testData: RDD[Vector]) and predict(testData: Vector). Are these still 
relevant if we implement the changes in 1)? There would never be a Vector, just 
Double. Also we would need feature in 1) to be able to predict label.
    
    3) How do you expect the java api to look like? Unfortunately the 
java/scala interop here is not very helpful. When train method expects tuple of 
scala.Double then when called from java you get:
    
    [error]     IsotonicRegressionModel model = 
IsotonicRegression.train(testRDD.rdd(), true);
    [error]                                                       ^
    [error]   required: RDD<Tuple3<Object,Object,Object>>,boolean
    [error]   found: RDD<Tuple3<Double,Double,Double>>,boolean
    [error]   reason: actual argument RDD<Tuple3<Double,Double,Double>> cannot 
be converted to RDD<Tuple3<Object,Object,Object>> by method invocation 
conversion
    
    There are solutions to this problem, but most of them quite ugly. See for 
example 
http://stackoverflow.com/questions/17071061/scala-java-interoperability-how-to-deal-with-options-containing-int-long-primi
 or http://www.scala-notes.org/2011/04/specializing-for-primitive-types/.
    
    Is there another public java api that uses primitive type in generic that I 
could use as reference?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to