You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by tilumi <gi...@git.apache.org> on 2016/06/12 23:22:51 UTC

[GitHub] spark pull request #13627: [SPARK-15906][MLlib][WIP] Add complementary naive...

GitHub user tilumi opened a pull request:

    https://github.com/apache/spark/pull/13627

    [SPARK-15906][MLlib][WIP] Add complementary naive bayes algorithm

    ## What changes were proposed in this pull request?
    
    Add `ComplementaryNaiveBayes.scala` in package `org.apache.spark.mllib.classification` in MLlib module
    
    
    ## How was this patch tested?
    
    (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
    
    
    (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tilumi/spark add_complementary_navie_bayes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/13627.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13627
    
----
commit 4f67cd12364a830fa579e443c716dd09a9f13f8a
Author: Lucas Yang <lu...@yahoo-inc.com>
Date:   2016-06-11T04:37:55Z

    extract data aggregattion part in run as method

commit d9f6191676c5c2253dcc6983e4418bcb67cf02b9
Author: Lucas Yang <lu...@yahoo-inc.com>
Date:   2016-06-11T04:38:18Z

    add complementary naive bayes algorithm

commit 0f02643db606944e2f919ebeaae427efb45515b7
Author: Lucas Yang <lu...@yahoo-inc.com>
Date:   2016-06-12T23:03:09Z

    add Since annotation

----


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

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


[GitHub] spark pull request #13627: [SPARK-15906][MLlib][WIP] Add complementary naive...

Posted by tilumi <gi...@git.apache.org>.
Github user tilumi commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13627#discussion_r66780066
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala ---
    @@ -446,8 +460,14 @@ object NaiveBayes {
       /** String name for Bernoulli model type. */
       private[spark] val Bernoulli: String = "bernoulli"
     
    +  /** String name for complementary multinomial model type. */
    +  private[spark] val Complementary_Multinomial: String = "complementary_multinomial"
    --- End diff --
    
    OK, I got it. I would add another parameter in NaiveBayse for indicating it's comlementary or not


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

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


[GitHub] spark issue #13627: [SPARK-15906][MLlib] Add complementary naive bayes algor...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13627
  
    Can one of the admins verify this patch?


---

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


[GitHub] spark issue #13627: [SPARK-15906][MLlib] Add complementary naive bayes algor...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13627
  
    Can one of the admins verify this patch?


---

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


[GitHub] spark pull request #13627: [SPARK-15906][MLlib][WIP] Add complementary naive...

Posted by tilumi <gi...@git.apache.org>.
Github user tilumi commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13627#discussion_r66779528
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala ---
    @@ -446,8 +460,14 @@ object NaiveBayes {
       /** String name for Bernoulli model type. */
       private[spark] val Bernoulli: String = "bernoulli"
     
    +  /** String name for complementary multinomial model type. */
    +  private[spark] val Complementary_Multinomial: String = "complementary_multinomial"
    --- End diff --
    
    Thanks for the comment. So should I create a `ComplementaryNaiveBayes` class?


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

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


[GitHub] spark pull request #13627: [SPARK-15906][MLlib][WIP] Add complementary naive...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13627#discussion_r66750935
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala ---
    @@ -446,8 +460,14 @@ object NaiveBayes {
       /** String name for Bernoulli model type. */
       private[spark] val Bernoulli: String = "bernoulli"
     
    +  /** String name for complementary multinomial model type. */
    +  private[spark] val Complementary_Multinomial: String = "complementary_multinomial"
    --- End diff --
    
    I don't think these should be unrelated types. Complementary-ness is orthogonal to binary vs multinomial. The constant name is not conventional in any event.


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

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


[GitHub] spark pull request #13627: [SPARK-15906][MLlib][WIP] Add complementary naive...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13627#discussion_r66779701
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala ---
    @@ -446,8 +460,14 @@ object NaiveBayes {
       /** String name for Bernoulli model type. */
       private[spark] val Bernoulli: String = "bernoulli"
     
    +  /** String name for complementary multinomial model type. */
    +  private[spark] val Complementary_Multinomial: String = "complementary_multinomial"
    --- End diff --
    
    No, but you can try to refactor the existing implementations to have some "complementary" config. It's possible that later these are exposed as separate types, but underneath, no need to be.


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

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


[GitHub] spark issue #13627: [SPARK-15906][MLlib][WIP] Add complementary naive bayes ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13627
  
    Can one of the admins verify this patch?


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

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


[GitHub] spark issue #13627: [SPARK-15906][MLlib] Add complementary naive bayes algor...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13627
  
    Can one of the admins verify this patch?


---

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