You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wangmiao1981 <gi...@git.apache.org> on 2017/05/27 07:31:24 UTC

[GitHub] spark pull request #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

GitHub user wangmiao1981 opened a pull request:

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

    [SPARK-20906][SparkR]:Constrained Logistic Regression for SparkR

    ## What changes were proposed in this pull request?
    
    PR https://github.com/apache/spark/pull/17715 Added Constrained Logistic Regression for ML. We should add it to SparkR.
    
    ## How was this patch tested?
    
    Add new unit tests.

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

    $ git pull https://github.com/wangmiao1981/spark test

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

    https://github.com/apache/spark/pull/18128.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 #18128
    
----
commit 1fc68f69ecce46c8d4c2bbd2d9aafdd042c27108
Author: wangmiao1981 <wm...@hotmail.com>
Date:   2017-05-27T06:27:04Z

    add constraint logit

commit 7627ac9c093ba72afd586c3ea1e482238d29c3c3
Author: wangmiao1981 <wm...@hotmail.com>
Date:   2017-05-27T07:29:25Z

    add unit test and 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 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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r122135628
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,64 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            row <- 0
    +            col <- 0
     
                 if (!is.null(weightCol) && weightCol == "") {
                   weightCol <- NULL
                 } else if (!is.null(weightCol)) {
                   weightCol <- as.character(weightCol)
                 }
     
    +            if (!is.null(lowerBoundsOnIntercepts)) {
    +                lowerBoundsOnIntercepts <- as.array(lowerBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(upperBoundsOnIntercepts)) {
    +                upperBoundsOnIntercepts <- as.array(upperBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(lowerBoundsOnCoefficients)) {
    +              if (class(lowerBoundsOnCoefficients) != "matrix") {
    +                stop("lowerBoundsOnCoefficients must be a matrix.")
    +              }
    +              row <- nrow(lowerBoundsOnCoefficients)
    +              col <- ncol(lowerBoundsOnCoefficients)
    +              lowerBoundsOnCoefficients <- as.array(as.vector(lowerBoundsOnCoefficients))
    +            }
    +
    +            if (!is.null(upperBoundsOnCoefficients)) {
    +              if (class(upperBoundsOnCoefficients) != "matrix") {
    +                stop("upperBoundsOnCoefficients must be a matrix.")
    +              }
    +
    +              if (!is.null(lowerBoundsOnCoefficients) & (row != nrow(upperBoundsOnCoefficients)
    +                | col != ncol(upperBoundsOnCoefficients))) {
    --- End diff --
    
    while logically and semantically correct here, might prefer `&&` and `||` instead of `&` and `|` here for programmability/correctness in case something becomes length > 1 here later


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77456/
    Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77607 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77607/testReport)** for PR 18128 at commit [`4c7b97c`](https://github.com/apache/spark/commit/4c7b97c16ba0e89ba96283ee5a0a9ad489329b67).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119911447
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,57 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            lrow <- 0
    +            lcol <- 0
    +            urow <- 0
    +            ucol <- 0
    --- End diff --
    
    Oh, I think I can do the check because I have a `NULL` check before enforcing the rule.



---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77462/
    Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77703/
    Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/78172/
    Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    @wangmiao1981  I'm at DataWorks Summit today and tomorrow, will take a look by this Friday. Thanks.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77699 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77699/testReport)** for PR 18128 at commit [`b89a0f7`](https://github.com/apache/spark/commit/b89a0f71d22b02b854ee0c4cad4656ae31fc0321).
     * This patch **fails SparkR unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77706 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77706/testReport)** for PR 18128 at commit [`2a7e6e3`](https://github.com/apache/spark/commit/2a7e6e3cde6431a6f2015c3ee731ed354934674d).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r118827649
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,51 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            lrow <- 0
    +            lcol <- 0
    +            urow <- 0
    +            ucol <- 0
     
                 if (!is.null(weightCol) && weightCol == "") {
                   weightCol <- NULL
                 } else if (!is.null(weightCol)) {
                   weightCol <- as.character(weightCol)
                 }
     
    +            if (!is.null(lowerBoundsOnIntercepts)) {
    +                lowerBoundsOnIntercepts <- as.array(lowerBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(upperBoundsOnIntercepts)) {
    +                upperBoundsOnIntercepts <- as.array(upperBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(lowerBoundsOnCoefficients)) {
    +              lrow <- nrow(lowerBoundsOnCoefficients)
    +              lcol <- ncol(lowerBoundsOnCoefficients)
    +              lowerBoundsOnCoefficients <- as.array(as.vector(lowerBoundsOnCoefficients))
    +            }
    +
    +            if (!is.null(upperBoundsOnCoefficients)) {
    +              urow <- nrow(upperBoundsOnCoefficients)
    +              ucol <- ncol(upperBoundsOnCoefficients)
    --- End diff --
    
    could you add some check for upperBoundsOnCoefficients or lowerBoundsOnCoefficients
    for example, if upperBoundsOnCoefficients is a vector instead of a matrix, ncol(as.array(upperBoundsOnCoefficients)) will be NA


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77455/
    Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77703 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77703/testReport)** for PR 18128 at commit [`b89a0f7`](https://github.com/apache/spark/commit/b89a0f71d22b02b854ee0c4cad4656ae31fc0321).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77909/
    Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    @yanboliang 


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77462 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77462/testReport)** for PR 18128 at commit [`354eeb3`](https://github.com/apache/spark/commit/354eeb3eeb54ae5ea53889026e3aaa90b218d277).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77695 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77695/testReport)** for PR 18128 at commit [`47fbccc`](https://github.com/apache/spark/commit/47fbccc020827a8ccc06f53298b4c5344df43cd7).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77691 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77691/testReport)** for PR 18128 at commit [`c304ba8`](https://github.com/apache/spark/commit/c304ba8c173da3d7c2c9d45a807d828d7074710e).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77909 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77909/testReport)** for PR 18128 at commit [`c3190b5`](https://github.com/apache/spark/commit/c3190b5b4701afeceec17bbaa7c4ef6f0239b2c8).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77607 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77607/testReport)** for PR 18128 at commit [`4c7b97c`](https://github.com/apache/spark/commit/4c7b97c16ba0e89ba96283ee5a0a9ad489329b67).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77456 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77456/testReport)** for PR 18128 at commit [`9d302c4`](https://github.com/apache/spark/commit/9d302c42f8e841338858c841d6dccb70542576c3).
     * This patch **fails R style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #78172 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/78172/testReport)** for PR 18128 at commit [`45b62cc`](https://github.com/apache/spark/commit/45b62cc9b070105ff2553ffc7b1e5788dc8134e5).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    @wangmiao1981 Will review soon. Thanks.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    @yanboliang Can you take a look? Thanks!


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77495/
    Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77456 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77456/testReport)** for PR 18128 at commit [`9d302c4`](https://github.com/apache/spark/commit/9d302c42f8e841338858c841d6dccb70542576c3).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77706 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77706/testReport)** for PR 18128 at commit [`2a7e6e3`](https://github.com/apache/spark/commit/2a7e6e3cde6431a6f2015c3ee731ed354934674d).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77695 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77695/testReport)** for PR 18128 at commit [`47fbccc`](https://github.com/apache/spark/commit/47fbccc020827a8ccc06f53298b4c5344df43cd7).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    merged to master.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77699/
    Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77495 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77495/testReport)** for PR 18128 at commit [`8094b8d`](https://github.com/apache/spark/commit/8094b8d100bbb4ce1201ccbcf9c593c159b2e60a).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    @felixcheung if I remove `as.integer`, backend doesn't recognize it as `integer`.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77457/
    Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77457 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77457/testReport)** for PR 18128 at commit [`6a5b568`](https://github.com/apache/spark/commit/6a5b568fc3b3aae7b9524005b55bad6a14348bd6).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77495 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77495/testReport)** for PR 18128 at commit [`8094b8d`](https://github.com/apache/spark/commit/8094b8d100bbb4ce1201ccbcf9c593c159b2e60a).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77455 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77455/testReport)** for PR 18128 at commit [`7627ac9`](https://github.com/apache/spark/commit/7627ac9c093ba72afd586c3ea1e482238d29c3c3).
     * This patch **fails R style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77691/
    Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r122135013
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -202,6 +202,20 @@ function(object, path, overwrite = FALSE) {
     #' @param aggregationDepth The depth for treeAggregate (greater than or equal to 2). If the dimensions of features
     #'                         or the number of partitions are large, this param could be adjusted to a larger size.
     #'                         This is an expert parameter. Default value should be good for most cases.
    +#' @param lowerBoundsOnCoefficients The lower bounds on coefficients if fitting under bound constrained optimization.
    +#'                                  The bound matrix must be compatible with the shape (1, number of features) for binomial
    +#'                                  regression, or (number of classes, number of features) for multinomial regression.
    +#'                                  It is a R matrix.
    +#' @param upperBoundsOnCoefficients The upper bounds on coefficients if fitting under bound constrained optimization.
    +#'                                  The bound matrix must be compatible with the shape (1, number of features) for binomial
    +#'                                  regression, or (number of classes, number of features) for multinomial regression.
    +#'                                  It is a R matrix.
    +#' @param lowerBoundsOnIntercepts The lower bounds on intercepts if fitting under bound constrained optimization.
    +#'                                The bounds vector size must be equal with 1 for binomial regression, or the number
    +#'                                of classes for multinomial regression.
    +#' @param upperBoundsOnIntercepts The upper bounds on intercepts if fitting under bound constrained optimization.
    +#'                                The bound vector size must be equal with 1 for binomial regression, or the number
    --- End diff --
    
    ditto here `size must be equal with 1`


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119978881
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,64 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            row <- 0
    +            col <- 0
     
                 if (!is.null(weightCol) && weightCol == "") {
                   weightCol <- NULL
                 } else if (!is.null(weightCol)) {
                   weightCol <- as.character(weightCol)
                 }
     
    +            if (!is.null(lowerBoundsOnIntercepts)) {
    +                lowerBoundsOnIntercepts <- as.array(lowerBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(upperBoundsOnIntercepts)) {
    +                upperBoundsOnIntercepts <- as.array(upperBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(lowerBoundsOnCoefficients)) {
    +              if (class(lowerBoundsOnCoefficients) != "matrix") {
    +                stop("lowerBoundsOnCoefficients must be a matrix.")
    +              }
    +              row <- nrow(lowerBoundsOnCoefficients)
    +              col <- ncol(lowerBoundsOnCoefficients)
    +              lowerBoundsOnCoefficients <- as.array(as.vector(lowerBoundsOnCoefficients))
    +            }
    +
    +            if (!is.null(upperBoundsOnCoefficients)) {
    +              if (class(upperBoundsOnCoefficients) != "matrix") {
    +                stop("upperBoundsOnCoefficients must be a matrix.")
    +              }
    +
    +              if (!is.null(lowerBoundsOnCoefficients) & (row != nrow(upperBoundsOnCoefficients)
    +                | col != ncol(upperBoundsOnCoefficients))) {
    +                stop(paste("dimension of upperBoundsOnCoefficients ",
    +                           "is not the same as lowerBoundsOnCoefficients", sep = ""))
    +              }
    +
    +              if (is.null(lowerBoundsOnCoefficients)) {
    +                row <- nrow(upperBoundsOnCoefficients)
    +                col <- ncol(upperBoundsOnCoefficients)
    +              }
    --- End diff --
    
    This is the case where we only set the upperbound. We can set both or either one of them.
    
    For the case that both are set. We enforce upperbound and lowerbound are the same dimension, as checked above.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119978607
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,64 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            row <- 0
    +            col <- 0
     
                 if (!is.null(weightCol) && weightCol == "") {
                   weightCol <- NULL
                 } else if (!is.null(weightCol)) {
                   weightCol <- as.character(weightCol)
                 }
     
    +            if (!is.null(lowerBoundsOnIntercepts)) {
    +                lowerBoundsOnIntercepts <- as.array(lowerBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(upperBoundsOnIntercepts)) {
    +                upperBoundsOnIntercepts <- as.array(upperBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(lowerBoundsOnCoefficients)) {
    +              if (class(lowerBoundsOnCoefficients) != "matrix") {
    +                stop("lowerBoundsOnCoefficients must be a matrix.")
    +              }
    +              row <- nrow(lowerBoundsOnCoefficients)
    +              col <- ncol(lowerBoundsOnCoefficients)
    +              lowerBoundsOnCoefficients <- as.array(as.vector(lowerBoundsOnCoefficients))
    +            }
    +
    +            if (!is.null(upperBoundsOnCoefficients)) {
    +              if (class(upperBoundsOnCoefficients) != "matrix") {
    +                stop("upperBoundsOnCoefficients must be a matrix.")
    +              }
    +
    +              if (!is.null(lowerBoundsOnCoefficients) & (row != nrow(upperBoundsOnCoefficients)
    +                | col != ncol(upperBoundsOnCoefficients))) {
    +                stop(paste("dimension of upperBoundsOnCoefficients ",
    +                           "is not the same as lowerBoundsOnCoefficients", sep = ""))
    +              }
    +
    +              if (is.null(lowerBoundsOnCoefficients)) {
    +                row <- nrow(upperBoundsOnCoefficients)
    +                col <- ncol(upperBoundsOnCoefficients)
    +              }
    +
    +              upperBoundsOnCoefficients <- as.array(as.vector(upperBoundsOnCoefficients))
    +            }
    +
                 jobj <- callJStatic("org.apache.spark.ml.r.LogisticRegressionWrapper", "fit",
                                     data@sdf, formula, as.numeric(regParam),
                                     as.numeric(elasticNetParam), as.integer(maxIter),
                                     as.numeric(tol), as.character(family),
                                     as.logical(standardization), as.array(thresholds),
    -                                weightCol, as.integer(aggregationDepth))
    +                                weightCol, as.integer(aggregationDepth),
    +                                as.integer(row), as.integer(col),
    --- End diff --
    
    nit: no need to `as.integer(row)` and `as.integer(col)` since they are set internally and not a parameter


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119911006
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,57 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            lrow <- 0
    +            lcol <- 0
    +            urow <- 0
    +            ucol <- 0
    --- End diff --
    
    Question: Based on my understanding, `lowerBoundsOnCoefficients ` and `upperBoundsOnCoefficients ` are not required to set at the same time. They can be set at the same time.
    For the first case, we can't enforce the dimension of the two matrices because one could be `NULL`. 
    For the second case, we can check it.
    
    So, we can't enforce the rule in general.
    



---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77706/
    Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    ping @yanboliang 


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77455 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77455/testReport)** for PR 18128 at commit [`7627ac9`](https://github.com/apache/spark/commit/7627ac9c093ba72afd586c3ea1e482238d29c3c3).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test FAILed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Jenkins retest this please


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    ok, thanks, i guess it could be set as `0L` but this is good.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77607/
    Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #78172 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/78172/testReport)** for PR 18128 at commit [`45b62cc`](https://github.com/apache/spark/commit/45b62cc9b070105ff2553ffc7b1e5788dc8134e5).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77699 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77699/testReport)** for PR 18128 at commit [`b89a0f7`](https://github.com/apache/spark/commit/b89a0f71d22b02b854ee0c4cad4656ae31fc0321).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77457 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77457/testReport)** for PR 18128 at commit [`6a5b568`](https://github.com/apache/spark/commit/6a5b568fc3b3aae7b9524005b55bad6a14348bd6).
     * This patch **fails SparkR unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119995950
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,64 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            row <- 0
    +            col <- 0
     
                 if (!is.null(weightCol) && weightCol == "") {
                   weightCol <- NULL
                 } else if (!is.null(weightCol)) {
                   weightCol <- as.character(weightCol)
                 }
     
    +            if (!is.null(lowerBoundsOnIntercepts)) {
    +                lowerBoundsOnIntercepts <- as.array(lowerBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(upperBoundsOnIntercepts)) {
    +                upperBoundsOnIntercepts <- as.array(upperBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(lowerBoundsOnCoefficients)) {
    +              if (class(lowerBoundsOnCoefficients) != "matrix") {
    +                stop("lowerBoundsOnCoefficients must be a matrix.")
    +              }
    +              row <- nrow(lowerBoundsOnCoefficients)
    +              col <- ncol(lowerBoundsOnCoefficients)
    +              lowerBoundsOnCoefficients <- as.array(as.vector(lowerBoundsOnCoefficients))
    +            }
    +
    +            if (!is.null(upperBoundsOnCoefficients)) {
    +              if (class(upperBoundsOnCoefficients) != "matrix") {
    +                stop("upperBoundsOnCoefficients must be a matrix.")
    +              }
    +
    +              if (!is.null(lowerBoundsOnCoefficients) & (row != nrow(upperBoundsOnCoefficients)
    +                | col != ncol(upperBoundsOnCoefficients))) {
    +                stop(paste("dimension of upperBoundsOnCoefficients ",
    +                           "is not the same as lowerBoundsOnCoefficients", sep = ""))
    +              }
    +
    +              if (is.null(lowerBoundsOnCoefficients)) {
    +                row <- nrow(upperBoundsOnCoefficients)
    +                col <- ncol(upperBoundsOnCoefficients)
    +              }
    --- End diff --
    
    ok thanks, L290-291


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Merged build finished. Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119787497
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,57 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            lrow <- 0
    +            lcol <- 0
    +            urow <- 0
    +            ucol <- 0
    --- End diff --
    
    Here we can reduce from four parameters to two: ```nrow``` and ```ncol```, since the matrix format of ```lowerBoundsOnCoefficients``` and ```upperBoundsOnCoefficients``` should be consistent. If the input doesn't confirm with this rule, we need to throw exception.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77462 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77462/testReport)** for PR 18128 at commit [`354eeb3`](https://github.com/apache/spark/commit/354eeb3eeb54ae5ea53889026e3aaa90b218d277).


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Local test passed. Let me check it tonight.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77691 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77691/testReport)** for PR 18128 at commit [`c304ba8`](https://github.com/apache/spark/commit/c304ba8c173da3d7c2c9d45a807d828d7074710e).
     * This patch **fails R style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119978589
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,64 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            row <- 0
    +            col <- 0
     
                 if (!is.null(weightCol) && weightCol == "") {
                   weightCol <- NULL
                 } else if (!is.null(weightCol)) {
                   weightCol <- as.character(weightCol)
                 }
     
    +            if (!is.null(lowerBoundsOnIntercepts)) {
    +                lowerBoundsOnIntercepts <- as.array(lowerBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(upperBoundsOnIntercepts)) {
    +                upperBoundsOnIntercepts <- as.array(upperBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(lowerBoundsOnCoefficients)) {
    +              if (class(lowerBoundsOnCoefficients) != "matrix") {
    +                stop("lowerBoundsOnCoefficients must be a matrix.")
    +              }
    +              row <- nrow(lowerBoundsOnCoefficients)
    +              col <- ncol(lowerBoundsOnCoefficients)
    +              lowerBoundsOnCoefficients <- as.array(as.vector(lowerBoundsOnCoefficients))
    +            }
    +
    +            if (!is.null(upperBoundsOnCoefficients)) {
    +              if (class(upperBoundsOnCoefficients) != "matrix") {
    +                stop("upperBoundsOnCoefficients must be a matrix.")
    +              }
    +
    +              if (!is.null(lowerBoundsOnCoefficients) & (row != nrow(upperBoundsOnCoefficients)
    +                | col != ncol(upperBoundsOnCoefficients))) {
    +                stop(paste("dimension of upperBoundsOnCoefficients ",
    --- End diff --
    
    paste would insert space - use paste0 instead or just remove the space in the string to let it to add it


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119788169
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/r/LogisticRegressionWrapper.scala ---
    @@ -97,7 +97,15 @@ private[r] object LogisticRegressionWrapper
           standardization: Boolean,
           thresholds: Array[Double],
           weightCol: String,
    -      aggregationDepth: Int
    +      aggregationDepth: Int,
    +      lrow: Int,
    +      lcol: Int,
    +      urow: Int,
    +      ucol: Int,
    --- End diff --
    
    See my comment above, we can merge the four parameters into two: ```numRowsOfBoundsOnCoefficients``` and ```numColsOfBoundsOnCoefficients```, please follow Scala naming convention.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77695/
    Test PASSed.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119978644
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -239,21 +253,64 @@ function(object, path, overwrite = FALSE) {
     setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula"),
               function(data, formula, regParam = 0.0, elasticNetParam = 0.0, maxIter = 100,
                        tol = 1E-6, family = "auto", standardization = TRUE,
    -                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2) {
    +                   thresholds = 0.5, weightCol = NULL, aggregationDepth = 2,
    +                   lowerBoundsOnCoefficients = NULL, upperBoundsOnCoefficients = NULL,
    +                   lowerBoundsOnIntercepts = NULL, upperBoundsOnIntercepts = NULL) {
                 formula <- paste(deparse(formula), collapse = "")
    +            row <- 0
    +            col <- 0
     
                 if (!is.null(weightCol) && weightCol == "") {
                   weightCol <- NULL
                 } else if (!is.null(weightCol)) {
                   weightCol <- as.character(weightCol)
                 }
     
    +            if (!is.null(lowerBoundsOnIntercepts)) {
    +                lowerBoundsOnIntercepts <- as.array(lowerBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(upperBoundsOnIntercepts)) {
    +                upperBoundsOnIntercepts <- as.array(upperBoundsOnIntercepts)
    +            }
    +
    +            if (!is.null(lowerBoundsOnCoefficients)) {
    +              if (class(lowerBoundsOnCoefficients) != "matrix") {
    +                stop("lowerBoundsOnCoefficients must be a matrix.")
    +              }
    +              row <- nrow(lowerBoundsOnCoefficients)
    +              col <- ncol(lowerBoundsOnCoefficients)
    +              lowerBoundsOnCoefficients <- as.array(as.vector(lowerBoundsOnCoefficients))
    +            }
    +
    +            if (!is.null(upperBoundsOnCoefficients)) {
    +              if (class(upperBoundsOnCoefficients) != "matrix") {
    +                stop("upperBoundsOnCoefficients must be a matrix.")
    +              }
    +
    +              if (!is.null(lowerBoundsOnCoefficients) & (row != nrow(upperBoundsOnCoefficients)
    +                | col != ncol(upperBoundsOnCoefficients))) {
    +                stop(paste("dimension of upperBoundsOnCoefficients ",
    +                           "is not the same as lowerBoundsOnCoefficients", sep = ""))
    +              }
    +
    +              if (is.null(lowerBoundsOnCoefficients)) {
    +                row <- nrow(upperBoundsOnCoefficients)
    +                col <- ncol(upperBoundsOnCoefficients)
    +              }
    --- End diff --
    
    given how this is used later in scala code, should there be a check that nrow(upper) == nrow(lower) and ditto for ncol(upper) == ncol(lower)?


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77703 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77703/testReport)** for PR 18128 at commit [`b89a0f7`](https://github.com/apache/spark/commit/b89a0f71d22b02b854ee0c4cad4656ae31fc0321).
     * This patch **fails SparkR unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r122134992
  
    --- Diff: R/pkg/R/mllib_classification.R ---
    @@ -202,6 +202,20 @@ function(object, path, overwrite = FALSE) {
     #' @param aggregationDepth The depth for treeAggregate (greater than or equal to 2). If the dimensions of features
     #'                         or the number of partitions are large, this param could be adjusted to a larger size.
     #'                         This is an expert parameter. Default value should be good for most cases.
    +#' @param lowerBoundsOnCoefficients The lower bounds on coefficients if fitting under bound constrained optimization.
    +#'                                  The bound matrix must be compatible with the shape (1, number of features) for binomial
    +#'                                  regression, or (number of classes, number of features) for multinomial regression.
    +#'                                  It is a R matrix.
    +#' @param upperBoundsOnCoefficients The upper bounds on coefficients if fitting under bound constrained optimization.
    +#'                                  The bound matrix must be compatible with the shape (1, number of features) for binomial
    +#'                                  regression, or (number of classes, number of features) for multinomial regression.
    +#'                                  It is a R matrix.
    +#' @param lowerBoundsOnIntercepts The lower bounds on intercepts if fitting under bound constrained optimization.
    +#'                                The bounds vector size must be equal with 1 for binomial regression, or the number
    --- End diff --
    
    `size must be equal with 1` - should this be `size must be equal to 1`?


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regres...

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

    https://github.com/apache/spark/pull/18128#discussion_r119788377
  
    --- Diff: R/pkg/inst/tests/testthat/test_mllib_classification.R ---
    @@ -225,6 +225,32 @@ test_that("spark.logit", {
       model2 <- spark.logit(df2, label ~ feature, weightCol = "weight")
       prediction2 <- collect(select(predict(model2, df2), "prediction"))
       expect_equal(sort(prediction2$prediction), c("0.0", "0.0", "0.0", "0.0", "0.0"))
    +
    +  # Test binomial logistic regression againt two classes with upperBoundsOnCoefficients
    +  # and upperBoundsOnIntercepts
    +  u <- matrix(c(1.0, 0.0, 1.0, 0.0), nrow = 1, ncol = 4)
    +  model <- spark.logit(training, Species ~ ., upperBoundsOnCoefficients = u,
    +                       upperBoundsOnIntercepts = 1.0)
    +  summary <- summary(model)
    +  coefsR <- c(-11.13331, 1.00000, 0.00000, 1.00000, 0.00000)
    +  coefs <- summary$coefficients[, "Estimate"]
    +  expect_true(all(abs(coefsR - coefs) < 0.1))
    +  # Test upperBoundsOnCoefficients should be matrix
    +  expect_error(spark.logit(training, Species ~ ., upperBoundsOnCoefficients = as.array(c(1, 2)),
    +                           upperBoundsOnIntercepts = 1.0))
    +
    +  # Test binomial logistic regression againt two classes with lowerBoundsOnCoefficients
    +  # and lowerBoundsOnIntercepts
    +  l <- matrix(c(0.0, -1.0, 0.0, -1.0), nrow = 1, ncol = 4)
    +  model <- spark.logit(training, Species ~ ., lowerBoundsOnCoefficients = l,
    +                       lowerBoundsOnIntercepts = 0.0)
    +  summary <- summary(model)
    +  coefsR <- c(0, 0, -1, 0, 1.902192)
    +  coefs <- summary$coefficients[, "Estimate"]
    +  expect_true(all(abs(coefsR - coefs) < 0.1))
    +  # Test lowerBoundsOnCoefficients should be matrix
    +  expect_error(spark.logit(training, Species ~ ., lowerBoundsOnCoefficients = as.array(c(1, 2)),
    +                           lowerBoundsOnIntercepts = 0.0))
    --- End diff --
    
    Could you add test for ```multinomial``` logistic regression? I think only test one side bound is enough.


---
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 #18128: [SPARK-20906][SparkR]:Constrained Logistic Regression fo...

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

    https://github.com/apache/spark/pull/18128
  
    **[Test build #77909 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77909/testReport)** for PR 18128 at commit [`c3190b5`](https://github.com/apache/spark/commit/c3190b5b4701afeceec17bbaa7c4ef6f0239b2c8).


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