Github user mengxr commented on the pull request:

    https://github.com/apache/spark/pull/2491#issuecomment-57839878
  
    @staple Sorry for late response and thank you for working on this JIRA! For 
the best practice, before you start working on a JIRA, please first ask on the 
JIRA page and see whether someone else is working or plans to work on the same 
JIRA, to avoid duplicate effort. Discussing the design before sending out PR is 
also encouraged. I just assigned you to the JIRA.
    
    The algorithm looks good to me. Some general comments:
    1. The data to NB is usually sparse. I'm not sure whether grouping the 
conditional probabilities helps performance.
    2. In the implementation of `predict`, the output `RDD[Double]` doesn't 
have the same partitioner as the input data. Though the ordering doesn't 
change, it is still hard to inspect the result. I suggested adding 
`predictValues`, which takes `RDD[(K, Vector)]` and output `RDD[(K, Double)]`, 
so user can put either id or label in the key, and we can preserve the input 
partitioner.


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