Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5707#discussion_r29821470
  
    --- Diff: python/pyspark/mllib/util.py ---
    @@ -169,6 +169,14 @@ def loadLabeledPoints(sc, path, minPartitions=None):
             minPartitions = minPartitions or min(sc.defaultParallelism, 2)
             return callMLlibFunc("loadLabeledPoints", sc, path, minPartitions)
     
    +    @staticmethod
    +    def appendBias(data):
    --- End diff --
    
    Since the Scala version only operates on individual vectors, this one 
should not be a wrapper; it should do everything in Python.  The reason is that 
callMLlibFunc requires the SparkContext and needs to operate on the driver.  
But since appendBias operates per-Row, it needs to be called on workers.
    
    Also, please add doc.  Feel free to copy from Scala doc.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to