You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by keypointt <gi...@git.apache.org> on 2016/08/02 00:55:53 UTC

[GitHub] spark pull request #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

GitHub user keypointt opened a pull request:

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

    [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Classifier wrapper in SparkR

    https://issues.apache.org/jira/browse/SPARK-16445
    
    ## What changes were proposed in this pull request?
    
    Create Multilayer Perceptron Classifier wrapper in SparkR
    
    
    ## How was this patch tested?
    
    Tested manually on local machine

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

    $ git pull https://github.com/keypointt/spark SPARK-16445

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

    https://github.com/apache/spark/pull/14447.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 #14447
    
----
commit 400a5ec398bbae0f50f3220cec2acc20bc8b1d6a
Author: Xin Ren <ia...@126.com>
Date:   2016-07-15T19:20:17Z

    [SPARK-16445] add to r method list

commit 2e3fe27bd7f6109cacbe3e6b8a675c4034cc11e4
Author: Xin Ren <ia...@126.com>
Date:   2016-07-16T17:54:32Z

    Merge branch 'master' into SPARK-16445

commit 4d822b0d8e67adf264ff2019766ddbf3221934e8
Author: Xin Ren <ia...@126.com>
Date:   2016-07-18T06:26:50Z

    Merge branch 'master' into SPARK-16445

commit ce6f74d5020282762adbd96e101ed95ae9abf92c
Author: Xin Ren <ia...@126.com>
Date:   2016-07-19T06:56:29Z

    [SPARK-16445] add R method for monmlp

commit eff4097ffd9d66b7f226b07a8b6e89c4f7c15336
Author: Xin Ren <ia...@126.com>
Date:   2016-07-20T06:26:46Z

    [SPARK-16445] add fit() in r wrapper

commit fb87bd58f1490356d9c0b99d791194e1a18f03e6
Author: Xin Ren <ia...@126.com>
Date:   2016-07-22T05:59:45Z

    [SPARK-16445] model exists already, remove added ones

commit 0ed2280d7ca7d25b86411b3d97fa3e85353b19b1
Author: Xin Ren <ia...@126.com>
Date:   2016-07-22T06:11:04Z

    [SPARK-16445] rename, monmlp, to, mlp

commit 2d1d1400fc168a7628c62df88d8267ca12eceb0a
Author: Xin Ren <ia...@126.com>
Date:   2016-07-22T06:22:56Z

    [SPARK-16445] fix styles

commit bddde5c09bd65a2608c4287c9461b61c3598efab
Author: Xin Ren <ia...@126.com>
Date:   2016-07-22T06:42:07Z

    [SPARK-16445] r style fix

commit fc3b9492f6333e1049d2ea483e141f442a152098
Author: Xin Ren <ia...@126.com>
Date:   2016-07-22T06:51:12Z

    [SPARK-16445] missed json4s import

commit f3aa8fd75a67c557e193a9f030b07001781097a1
Author: Xin Ren <ia...@126.com>
Date:   2016-07-26T22:04:16Z

    Merge branch 'master' into SPARK-16445

commit 61c8122a2584dafb581b045bd3cd7c9742022786
Author: Xin Ren <ia...@126.com>
Date:   2016-07-26T22:04:31Z

    Merge branch 'SPARK-16445' of https://github.com/keypointt/spark into SPARK-16445

commit 07638f4f310469109ca766d14916a77960f80987
Author: Xin Ren <ia...@126.com>
Date:   2016-07-27T00:10:04Z

    [SPARK-16445] correct r method name

commit 79675ad567e16494d1d2445b773dc6fd3649bc7c
Author: Xin Ren <ia...@126.com>
Date:   2016-07-27T01:03:34Z

    [SPARK-16445] tmp save

commit 2d66705a4f26e2823c7102032f596d74a278bc68
Author: Xin Ren <ia...@126.com>
Date:   2016-07-29T22:36:39Z

    [SPARK-16445] fix model name

commit b7c4f0cd4870054eb628b333c016fabea37eb957
Author: Xin Ren <ia...@126.com>
Date:   2016-07-30T00:50:55Z

    [SPARK-16445] fix parameters

commit 52c23106d1623a6f54fb7ed2eae842988e8c7bbf
Author: Xin Ren <ia...@126.com>
Date:   2016-08-01T22:19:29Z

    Merge branch 'master' into SPARK-16445

commit 04f7fed0682548068d4bfddebce7bed276432a4d
Author: Xin Ren <ia...@126.com>
Date:   2016-08-02T00:52:27Z

    [SPARK-16445] r test failing

----


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74530185
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/ml/MultilayerPerceptronClassifierExample.scala ---
    @@ -32,6 +32,7 @@ object MultilayerPerceptronClassifierExample {
       def main(args: Array[String]): Unit = {
         val spark = SparkSession
           .builder
    +      .master("local[4]")
    --- End diff --
    
    is it better to have `local[*]`?


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63399 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63399/consoleFull)** for PR 14447 at commit [`a3f5bb5`](https://github.com/apache/spark/commit/a3f5bb503518681f9b3b40200406c922eb2b2609).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63395/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    These are the last few comments. @shivaram what do you think - with those fixed we are good to merge this?



---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63300 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63300/consoleFull)** for PR 14447 at commit [`eb5f5af`](https://github.com/apache/spark/commit/eb5f5afea9512015900dcc690edb292622b02379).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63761 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63761/consoleFull)** for PR 14447 at commit [`de9d0a7`](https://github.com/apache/spark/commit/de9d0a7908cf451c4368bcc085ef6e2bb306f7a8).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74675268
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -633,9 +635,10 @@ setMethod("write.ml", signature(object = "KMeansModel", path = "character"),
     #'                  which means throw exception if the output path exists.
     #'
     #' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame
    --- End diff --
    
    same here - `-method`


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64274 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64274/consoleFull)** for PR 14447 at commit [`0dea0d2`](https://github.com/apache/spark/commit/0dea0d290472049cb7ba0f7226c523756161c8ed).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74871845
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                as.character(solver), as.integer(maxIter), as.numeric(tol),
    +                                as.numeric(stepSize), as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @aliases predict,MultilayerPerceptronClassificationModel-method
    +#' @export
    +#' @note predict(MultilayerPerceptronClassificationModel) since 2.1.0
    +setMethod("predict", signature(object = "MultilayerPerceptronClassificationModel"),
    +          function(object, newData) {
    +            return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
    +          })
    +
    +# Returns the summary of a Multilayer Perceptron Classification Model produced by \code{spark.mlp}
    +
    +#' @param object A Multilayer Perceptron Classification Model fitted by \code{spark.mlp}
    --- End diff --
    
    ok, fixing it now. thanks Felix


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r75851816
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -90,7 +97,7 @@ setClass("ALSModel", representation(jobj = "jobj"))
     #' @export
     #' @seealso \link{spark.glm}, \link{glm},
     #' @seealso \link{spark.als}, \link{spark.gaussianMixture}, \link{spark.isoreg}, \link{spark.kmeans},
    -#' @seealso \link{spark.lda}, \link{spark.naiveBayes}, \link{spark.survreg},
    +#' @seealso \link{spark.lda}, \link{spark.naiveBayes}, \link{spark.survreg}, \link{spark.mlp}
    --- End diff --
    
    please sort this


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64247 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64247/consoleFull)** for PR 14447 at commit [`2d43f71`](https://github.com/apache/spark/commit/2d43f7123a256626ac3e5936fe40fd7bbed38fc4).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63624 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63624/consoleFull)** for PR 14447 at commit [`151cd6a`](https://github.com/apache/spark/commit/151cd6a4353bea1ca3fc919219b948fefd08dbce).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74870995
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                as.character(solver), as.integer(maxIter), as.numeric(tol),
    +                                as.numeric(stepSize), as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @aliases predict,MultilayerPerceptronClassificationModel-method
    +#' @export
    +#' @note predict(MultilayerPerceptronClassificationModel) since 2.1.0
    +setMethod("predict", signature(object = "MultilayerPerceptronClassificationModel"),
    +          function(object, newData) {
    +            return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
    +          })
    +
    +# Returns the summary of a Multilayer Perceptron Classification Model produced by \code{spark.mlp}
    +
    +#' @param object A Multilayer Perceptron Classification Model fitted by \code{spark.mlp}
    --- End diff --
    
    add `@param ... Currently not used` for CRAN check


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74530039
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,92 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Layers parameter
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame,formula-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                solver, as.integer(maxIter), tol, stepSize, as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @export
    +#' @note predict(MultilayerPerceptronClassificationModel) since 2.0.0
    --- End diff --
    
    please add @aliases for each function introduced in this PR.


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    hi @mengxr , could you please tell me how to debug R wrapper? Thanks a lot
    
    I tried to read documentation and google, but cannot figure it out myself. From SparkR console, the error message is too vague as below, and I tried to `tail -f` spark logs but no error messages, and also I tried to create a `RWrapperSuite` but the class is private and cannot be accessed.
    
    ```
    > model <- spark.mlp(irisDF, ~ Sepal_Length + Sepal_Width + Petal_Length + Petal_Width, blockSize=128, initialWeights=seq(1, 9, by = 2), layers=3, solver='LBFGS', seed=1234L, maxIter=100, tol=0.5, stepSize=1)
    16/08/01 17:16:38 ERROR RBackendHandler: fit on org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper failed
    Error in invokeJava(isStatic = TRUE, className, methodName, ...) :
    In addition: Warning message:
    In if (is.na(object)) { :
      the condition has length > 1 and only the first element will be used
    ```


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74530049
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -533,6 +626,26 @@ setMethod("write.ml", signature(object = "KMeansModel", path = "character"),
                 invisible(callJMethod(writer, "save", path))
               })
     
    +# Saves the Multilayer Perceptron Classification Model to the input path.
    +
    +#' @param path The directory where the model is saved
    +#' @param overwrite Overwrites or not if the output path already exists. Default is FALSE
    +#'                  which means throw exception if the output path exists.
    +#'
    +#' @rdname spark.mlp
    +#' @export
    --- End diff --
    
    please add @aliases


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63671 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63671/consoleFull)** for PR 14447 at commit [`230ea91`](https://github.com/apache/spark/commit/230ea91300698966e80d5b5edea4e487660eca25).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74529873
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,92 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Layers parameter
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame,formula-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                solver, as.integer(maxIter), tol, stepSize, as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @export
    +#' @note predict(MultilayerPerceptronClassificationModel) since 2.0.0
    +setMethod("predict", signature(object = "MultilayerPerceptronClassificationModel"),
    +          function(object, newData) {
    +            return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
    +          })
    +
    +# Returns the summary of a Multilayer Perceptron Classification Model produced by \code{spark.mlp}
    +
    +#' @param object A Multilayer Perceptron Classification Model fitted by \code{spark.mlp}
    +#' @return \code{summary} returns a list containing \code{layers}, the label distribution, and
    +#'         \code{tables}, conditional probabilities given the target label
    +#' @rdname spark.mlp
    +#' @export
    +#' @note summary(MultilayerPerceptronClassificationModel) since 2.0.0
    +setMethod("summary", signature(object = "MultilayerPerceptronClassificationModel"),
    +          function(object, ...) {
    +            jobj <- object@jobj
    +            labelCount <- callJMethod(jobj, "labelCount")
    +            layers <- callJMethod(jobj, "layers")
    +            layers <- unlist(layers)
    --- End diff --
    
    nit: combine this with the previous line?


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74692255
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                as.character(solver), as.integer(maxIter), as.numeric(tol),
    +                                as.numeric(stepSize), as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    --- End diff --
    
    wait, this alias doesn't seem right. It should be the name of the function + signature.
    ie.
    `@aliases predict,MultilayerPerceptronClassificationModel-method`


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74870693
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    --- End diff --
    
    We are working on the others in PR #14558, if it's not needed, I think we should remove `...` as of now CRAN check will flag this. We can always add parameter 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74675584
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -433,15 +433,15 @@ setMethod("predict", signature(object = "KMeansModel"),
     #'
     #' @param data A \code{SparkDataFrame} of observations and labels for model fitting
     #' @param blockSize BlockSize parameter
    -#' @param layers Layers parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
     #' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
     #' @param maxIter Maximum iteration number
     #' @param tol Convergence tolerance of iterations
     #' @param stepSize StepSize parameter
     #' @param seed Seed parameter for weights initialization
     #' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
     #' @rdname spark.mlp
    -#' @aliases spark.mlp,SparkDataFrame,formula-method
    +#' @aliases spark.mlp,SparkDataFrame
    --- End diff --
    
    oh sure, fixing it now


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74675213
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -433,15 +433,15 @@ setMethod("predict", signature(object = "KMeansModel"),
     #'
     #' @param data A \code{SparkDataFrame} of observations and labels for model fitting
     #' @param blockSize BlockSize parameter
    -#' @param layers Layers parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
     #' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
     #' @param maxIter Maximum iteration number
     #' @param tol Convergence tolerance of iterations
     #' @param stepSize StepSize parameter
     #' @param seed Seed parameter for weights initialization
     #' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
     #' @rdname spark.mlp
    -#' @aliases spark.mlp,SparkDataFrame,formula-method
    +#' @aliases spark.mlp,SparkDataFrame
    --- End diff --
    
    I think this should be `-method` at the end


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r75289453
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/r/MultilayerPerceptronClassifierWrapper.scala ---
    @@ -0,0 +1,135 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.ml.r
    +
    +import org.apache.hadoop.fs.Path
    +import org.json4s._
    +import org.json4s.JsonDSL._
    +import org.json4s.jackson.JsonMethods._
    +
    +import org.apache.spark.ml.{Pipeline, PipelineModel}
    +import org.apache.spark.ml.classification.{MultilayerPerceptronClassificationModel, MultilayerPerceptronClassifier}
    +import org.apache.spark.ml.util.{MLReadable, MLReader, MLWritable, MLWriter}
    +import org.apache.spark.sql.{DataFrame, Dataset}
    +
    +private[r] class MultilayerPerceptronClassifierWrapper private (
    +    val pipeline: PipelineModel,
    +    val labelCount: Long,
    +    val layers: Array[Int],
    +    val weights: Array[Double]
    +  ) extends MLWritable {
    +
    +  def transform(dataset: Dataset[_]): DataFrame = {
    +    pipeline.transform(dataset)
    +  }
    +
    +  /**
    +   * Returns an [[MLWriter]] instance for this ML instance.
    +   */
    +  override def write: MLWriter =
    +    new MultilayerPerceptronClassifierWrapper.MultilayerPerceptronClassifierWrapperWriter(this)
    +}
    +
    +private[r] object MultilayerPerceptronClassifierWrapper
    +  extends MLReadable[MultilayerPerceptronClassifierWrapper] {
    +
    +  val PREDICTED_LABEL_INDEX_COL = "pred_label_idx"
    --- End diff --
    
    this is unused?


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    I think your formula (```~ Sepal_Length + Sepal_Width + Petal_Length + Petal_Width```) is wrong. For classification problem, the target of the formula should not empty.


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63711 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63711/consoleFull)** for PR 14447 at commit [`e7fa68f`](https://github.com/apache/spark/commit/e7fa68feddebf05299de0f6d3b3513aeac02a241).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74529661
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,92 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Layers parameter
    --- End diff --
    
    something like "integer vector containing the number of nodes for each layer"


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64293/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63488 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63488/consoleFull)** for PR 14447 at commit [`ea55e6a`](https://github.com/apache/spark/commit/ea55e6a28427dc356af513a0631c6bff792369cf).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

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


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64293 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64293/consoleFull)** for PR 14447 at commit [`7526b65`](https://github.com/apache/spark/commit/7526b6507a84c9acc3078943c72548fb68516be6).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63671/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63100/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74530043
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,92 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Layers parameter
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame,formula-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                solver, as.integer(maxIter), tol, stepSize, as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @export
    +#' @note predict(MultilayerPerceptronClassificationModel) since 2.0.0
    +setMethod("predict", signature(object = "MultilayerPerceptronClassificationModel"),
    +          function(object, newData) {
    +            return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
    +          })
    +
    +# Returns the summary of a Multilayer Perceptron Classification Model produced by \code{spark.mlp}
    +
    +#' @param object A Multilayer Perceptron Classification Model fitted by \code{spark.mlp}
    +#' @return \code{summary} returns a list containing \code{layers}, the label distribution, and
    +#'         \code{tables}, conditional probabilities given the target label
    +#' @rdname spark.mlp
    +#' @export
    +#' @note summary(MultilayerPerceptronClassificationModel) since 2.0.0
    --- End diff --
    
    please add @aliases


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63564 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63564/consoleFull)** for PR 14447 at commit [`e08b7b0`](https://github.com/apache/spark/commit/e08b7b0ba949198ba471e3807f77bb7dac7ba4bb).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63488 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63488/consoleFull)** for PR 14447 at commit [`ea55e6a`](https://github.com/apache/spark/commit/ea55e6a28427dc356af513a0631c6bff792369cf).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    hi @felixcheung , I'm not sure what does this mean and how to get rid of it?
    ```
    * checking CRAN incoming feasibility ...Warning: bad markup (extra space?) at spark.mlp.Rd:68:77
     NOTE
    ```


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64293 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64293/consoleFull)** for PR 14447 at commit [`7526b65`](https://github.com/apache/spark/commit/7526b6507a84c9acc3078943c72548fb68516be6).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64001/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63820/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63395 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63395/consoleFull)** for PR 14447 at commit [`1eae07b`](https://github.com/apache/spark/commit/1eae07bc25734a9df738642fdea42cc1966d6044).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    hi @felixcheung, after I merge master in, I found that `spark.kmeans`, `spark.naiveBayes`, `spark.survreg`, `spark.isoreg` don't have the `#' @param ... Additional parameters ...
    `. https://github.com/apache/spark/blob/master/R/pkg/R/generics.R#L1325-L1327
    
    Should all the mllib methods explain the `@param ... `?
    
    ![screen shot 2016-08-22 at 1 03 27 pm](https://cloud.githubusercontent.com/assets/3925641/17869618/e9f85a0a-6868-11e6-84b1-69e78b49a8e2.png)



---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74529764
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,92 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Layers parameter
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame,formula-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                solver, as.integer(maxIter), tol, stepSize, as.integer(seed))
    --- End diff --
    
    should we add `as.numeric(tol)` and `as.integer(stepSize)` since their types are not in the signature?


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64291/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    hi @yanboliang I just tried formula `Species ~ Sepal_Length + Sepal_Width + Petal_Length + Petal_Width`, but still not working with msg 
    ```
    > model <- spark.mlp(irisDF, Species ~ Sepal_Length + Sepal_Width + Petal_Length + Petal_Width, blockSize=128, initialWeights=seq(1, 9, by = 2), layers=3, solver='LBFGS', seed=1234L, maxIter=100, tol=0.5, stepSize=1)
    16/08/02 10:21:48 ERROR RBackendHandler: fit on org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper failed
    Error in invokeJava(isStatic = TRUE, className, methodName, ...) :
    In addition: Warning message:
    In if (is.na(object)) { :
      the condition has length > 1 and only the first element will be used
    ```
    
    Do you mind tell me how did you debug it? I'd like to debug by steps but don't know how, thanks a lot


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    hi @felixcheung anything else I should do here?


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Yep, this looks good @felixcheung -- Feel free to merge once you think its good to go.


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63488/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74529897
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,92 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Layers parameter
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame,formula-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                solver, as.integer(maxIter), tol, stepSize, as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @export
    +#' @note predict(MultilayerPerceptronClassificationModel) since 2.0.0
    --- End diff --
    
    since 2.1.0


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74710214
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    --- End diff --
    
    oh this `...` is just following what it is from other wrappers, or I should remove `...` for this one as well as `spark.naiveBayes` and `spark.survreg`?
    
    https://github.com/apache/spark/blob/master/R/pkg/R/mllib.R#L455
    
    https://github.com/apache/spark/blob/master/R/pkg/R/mllib.R#L601
    



---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63820 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63820/consoleFull)** for PR 14447 at commit [`7c94e2b`](https://github.com/apache/spark/commit/7c94e2ba11655cbd9275793f6c069ab3ba844238).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63671 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63671/consoleFull)** for PR 14447 at commit [`230ea91`](https://github.com/apache/spark/commit/230ea91300698966e80d5b5edea4e487660eca25).
     * This patch **fails Scala 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74529446
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -53,6 +53,13 @@ setClass("AFTSurvivalRegressionModel", representation(jobj = "jobj"))
     #' @note KMeansModel since 2.0.0
     setClass("KMeansModel", representation(jobj = "jobj"))
     
    +#' S4 class that represents a MultilayerPerceptronClassificationModel
    +#'
    +#' @param jobj a Java object reference to the backing Scala MultilayerPerceptronClassifierWrapper
    +#' @export
    +#' @note MultilayerPerceptronClassificationModel since 2.0.0
    --- End diff --
    
    since 2.1.0


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63668 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63668/consoleFull)** for PR 14447 at commit [`5f7fd00`](https://github.com/apache/spark/commit/5f7fd001f442a5b55aacb931e2d54cbc22be8970).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74692317
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -533,6 +628,27 @@ setMethod("write.ml", signature(object = "KMeansModel", path = "character"),
                 invisible(callJMethod(writer, "save", path))
               })
     
    +# Saves the Multilayer Perceptron Classification Model to the input path.
    +
    +#' @param path The directory where the model is saved
    --- End diff --
    
    please add a `@param` for `object`


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    @felixcheung sure, no problem


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64279 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64279/consoleFull)** for PR 14447 at commit [`067f8fd`](https://github.com/apache/spark/commit/067f8fd110599d786ab44e66109f8af178133cc0).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    sure, will rebase


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74692309
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -533,6 +628,27 @@ setMethod("write.ml", signature(object = "KMeansModel", path = "character"),
                 invisible(callJMethod(writer, "save", path))
               })
     
    +# Saves the Multilayer Perceptron Classification Model to the input path.
    +
    +#' @param path The directory where the model is saved
    +#' @param overwrite Overwrites or not if the output path already exists. Default is FALSE
    +#'                  which means throw exception if the output path exists.
    +#'
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    --- End diff --
    
    ditto


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74709917
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                as.character(solver), as.integer(maxIter), as.numeric(tol),
    +                                as.numeric(stepSize), as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    --- End diff --
    
    I see, fixing it. sorry missing 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74530136
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -533,6 +626,26 @@ setMethod("write.ml", signature(object = "KMeansModel", path = "character"),
                 invisible(callJMethod(writer, "save", path))
               })
     
    +# Saves the Multilayer Perceptron Classification Model to the input path.
    +
    +#' @param path The directory where the model is saved
    +#' @param overwrite Overwrites or not if the output path already exists. Default is FALSE
    +#'                  which means throw exception if the output path exists.
    +#'
    +#' @rdname spark.mlp
    +#' @export
    +#' @seealso \link{write.ml}
    +#' @note write.ml(MultilayerPerceptronClassificationModel, character) since 2.0.0
    --- End diff --
    
    since 2.1.0


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74870955
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                as.character(solver), as.integer(maxIter), as.numeric(tol),
    +                                as.numeric(stepSize), as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    --- End diff --
    
    oops. add @param for object


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63668/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63761 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63761/consoleFull)** for PR 14447 at commit [`de9d0a7`](https://github.com/apache/spark/commit/de9d0a7908cf451c4368bcc085ef6e2bb306f7a8).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    merged, 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 pull request #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r75851828
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -103,7 +110,7 @@ NULL
     #' @export
     #' @seealso \link{spark.glm}, \link{glm},
     #' @seealso \link{spark.als}, \link{spark.gaussianMixture}, \link{spark.isoreg}, \link{spark.kmeans},
    -#' @seealso \link{spark.naiveBayes}, \link{spark.survreg},
    +#' @seealso \link{spark.naiveBayes}, \link{spark.survreg}, link{spark.mlp}
    --- End diff --
    
    ditto


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64247/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63399 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63399/consoleFull)** for PR 14447 at commit [`a3f5bb5`](https://github.com/apache/spark/commit/a3f5bb503518681f9b3b40200406c922eb2b2609).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r75783118
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -734,6 +830,28 @@ setMethod("write.ml", signature(object = "KMeansModel", path = "character"),
                 write_internal(object, path, overwrite)
               })
     
    +# Saves the Multilayer Perceptron Classification Model to the input path.
    +
    +#' @param object a Multilayer Perceptron Classification Model fitted by \code{spark.mlp}.
    +#' @param path the directory where the model is saved.
    +#' @param overwrite overwrites or not if the output path already exists. Default is FALSE
    +#'                  which means throw exception if the output path exists.
    +#'
    +#' @rdname spark.mlp
    +#' @aliases write.ml,MultilayerPerceptronClassificationModel,character-method
    +#' @export
    +#' @seealso \link{write.ml}
    +#' @note write.ml(MultilayerPerceptronClassificationModel, character) since 2.1.0
    +setMethod("write.ml", signature(object = "MultilayerPerceptronClassificationModel",
    +          path = "character"),
    +          function(object, path, overwrite = FALSE) {
    +            writer <- callJMethod(object@jobj, "write")
    --- End diff --
    
    please the changes I've referenced on how to update this.


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64231 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64231/consoleFull)** for PR 14447 at commit [`3d2d87a`](https://github.com/apache/spark/commit/3d2d87ac7393d5d798c34f008ee09f146de94640).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64291 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64291/consoleFull)** for PR 14447 at commit [`0449edb`](https://github.com/apache/spark/commit/0449edbe0dc33507274c85327ee339679b5129bb).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64274 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64274/consoleFull)** for PR 14447 at commit [`0dea0d2`](https://github.com/apache/spark/commit/0dea0d290472049cb7ba0f7226c523756161c8ed).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63673 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63673/consoleFull)** for PR 14447 at commit [`f56b805`](https://github.com/apache/spark/commit/f56b8054b2ed22e5872eb443ddf968e47f07fa6b).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    hi @felixcheung I got below lint-r error when running it on my laptop, after merging with master
    
    ```
    Warning message:
    In readLines(filename) :
      incomplete final line found on '/Users/quickmobile/workspace/spark/R/pkg/R/mllib.R'
    R/context.R:270:12: warning: no visible global function definition for \u2018collectRDD\u2019
      local <- collectRDD(results)
               ^~~~~~~~~~
    R/SQLContext.R:221:12: warning: no visible global function definition for \u2018firstRDD\u2019
        row <- firstRDD(rdd)
               ^~~~~~~~
    lintr checks 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    I did test locally this time, thanks Felix


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63100 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63100/consoleFull)** for PR 14447 at commit [`04f7fed`](https://github.com/apache/spark/commit/04f7fed0682548068d4bfddebce7bed276432a4d).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74692228
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    --- End diff --
    
    was there a reason for `...`? we are finding CRAN check would warn about it if we have it and we don't have a `@param` for it. I think it's best we don't have that in the function definition.


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63564 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63564/consoleFull)** for PR 14447 at commit [`e08b7b0`](https://github.com/apache/spark/commit/e08b7b0ba949198ba471e3807f77bb7dac7ba4bb).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63300 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63300/consoleFull)** for PR 14447 at commit [`eb5f5af`](https://github.com/apache/spark/commit/eb5f5afea9512015900dcc690edb292622b02379).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    so there are a few competing implementation in R and `mlp` might not be a super relevant name. @shivaram @mengxr any thought on `spark.mlp` here?


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63624 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63624/consoleFull)** for PR 14447 at commit [`151cd6a`](https://github.com/apache/spark/commit/151cd6a4353bea1ca3fc919219b948fefd08dbce).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74529891
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,92 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Layers parameter
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame,formula-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                solver, as.integer(maxIter), tol, stepSize, as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @export
    +#' @note predict(MultilayerPerceptronClassificationModel) since 2.0.0
    +setMethod("predict", signature(object = "MultilayerPerceptronClassificationModel"),
    +          function(object, newData) {
    +            return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
    +          })
    +
    +# Returns the summary of a Multilayer Perceptron Classification Model produced by \code{spark.mlp}
    +
    +#' @param object A Multilayer Perceptron Classification Model fitted by \code{spark.mlp}
    +#' @return \code{summary} returns a list containing \code{layers}, the label distribution, and
    +#'         \code{tables}, conditional probabilities given the target label
    +#' @rdname spark.mlp
    +#' @export
    +#' @note summary(MultilayerPerceptronClassificationModel) since 2.0.0
    --- End diff --
    
    since 2.1.0


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63668 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63668/consoleFull)** for PR 14447 at commit [`5f7fd00`](https://github.com/apache/spark/commit/5f7fd001f442a5b55aacb931e2d54cbc22be8970).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    btw, this has info on document generation so you could test this out locally:
    https://github.com/apache/spark/blob/master/R/DOCUMENTATION.md



---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63761/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64247 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64247/consoleFull)** for PR 14447 at commit [`2d43f71`](https://github.com/apache/spark/commit/2d43f7123a256626ac3e5936fe40fd7bbed38fc4).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63100 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63100/consoleFull)** for PR 14447 at commit [`04f7fed`](https://github.com/apache/spark/commit/04f7fed0682548068d4bfddebce7bed276432a4d).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64231 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64231/consoleFull)** for PR 14447 at commit [`3d2d87a`](https://github.com/apache/spark/commit/3d2d87ac7393d5d798c34f008ee09f146de94640).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `          logWarning(s\"All labels belong to a single class and fitIntercept=false. It's a \" +`
      * `   * Set thresholds in multiclass (or binary) classification to adjust the probability of`
      * `class MultinomialLogisticRegression @Since(\"2.1.0\") (`
      * `          logWarning(s\"All labels belong to a single class and fitIntercept=false. It's\" +`
      * `  /** Margin (rawPrediction) for each class label. */`
      * `  /** Score (probability) for each class label. */`
      * `  class MultinomialLogisticRegressionModelWriter(instance: MultinomialLogisticRegressionModel)`
      * `  class ALSWrapperWriter(instance: ALSWrapper) extends MLWriter `
      * `  class ALSWrapperReader extends MLReader[ALSWrapper] `
      * `class JavaClassificationModel(JavaPredictionModel):`
      * `class LogisticRegressionModel(JavaModel, JavaClassificationModel, JavaMLWritable, JavaMLReadable):`
      * `class DecisionTreeClassificationModel(DecisionTreeModel, JavaClassificationModel, JavaMLWritable,`
      * `class RandomForestClassificationModel(TreeEnsembleModel, JavaClassificationModel, JavaMLWritable,`
      * `class GBTClassificationModel(TreeEnsembleModel, JavaPredictionModel, JavaMLWritable,`
      * `class NaiveBayesModel(JavaModel, JavaClassificationModel, JavaMLWritable, JavaMLReadable):`
      * `class MultilayerPerceptronClassificationModel(JavaModel, JavaPredictionModel, JavaMLWritable,`
      * `class LinearRegressionModel(JavaModel, JavaPredictionModel, JavaMLWritable, JavaMLReadable):`
      * `class DecisionTreeModel(JavaModel, JavaPredictionModel):`
      * `class RandomForestRegressionModel(TreeEnsembleModel, JavaPredictionModel, JavaMLWritable,`
      * `class GBTRegressionModel(TreeEnsembleModel, JavaPredictionModel, JavaMLWritable, JavaMLReadable):`
      * `class GeneralizedLinearRegressionModel(JavaModel, JavaPredictionModel, JavaMLWritable,`
      * `class JavaPredictionModel():`
      * `case class UnresolvedInlineTable(`
      * `case class UnresolvedTableValuedFunction(functionName: String, functionArgs: Seq[Expression])`
      * `case class Literal (value: Any, dataType: DataType) extends LeafExpression with CodegenFallback `


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64291 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64291/consoleFull)** for PR 14447 at commit [`0449edb`](https://github.com/apache/spark/commit/0449edbe0dc33507274c85327ee339679b5129bb).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64233/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64001 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64001/consoleFull)** for PR 14447 at commit [`3bd1695`](https://github.com/apache/spark/commit/3bd169543fd63f39dc01ec07bbe3d77cb12b6a2c).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64233 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64233/consoleFull)** for PR 14447 at commit [`56b8cef`](https://github.com/apache/spark/commit/56b8cef26b667c2b4064544dc8e0f811ec56f877).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63395 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63395/consoleFull)** for PR 14447 at commit [`1eae07b`](https://github.com/apache/spark/commit/1eae07bc25734a9df738642fdea42cc1966d6044).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63564/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Actually I've already tried to change the classes to be public, and open them to not only `[r]` but every module which still does not work.
    
    And exactly, above comment msg is the only error log I have, and no more error logs I found...only got to know it failed on `fit()` method...
    
    So the question here actually is, how to find more error logs, like failed at which line of which file...


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Actually I don't have an excellent debug way for SparkR wrappers. Usually you can create a ```RWrapperSuite``` and test whether it works well in the Scala side (If you encounter some issues about private class, change it to public temporary for test). For your above issue, please provide more error logs, then I can help you to find some clue for the error.


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64231/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64001 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64001/consoleFull)** for PR 14447 at commit [`3bd1695`](https://github.com/apache/spark/commit/3bd169543fd63f39dc01ec07bbe3d77cb12b6a2c).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Please see the changes I have listed above for details - you will see that they are either removed or moved to mllib.R
    



---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64233 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64233/consoleFull)** for PR 14447 at commit [`56b8cef`](https://github.com/apache/spark/commit/56b8cef26b667c2b4064544dc8e0f811ec56f877).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63711 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63711/consoleFull)** for PR 14447 at commit [`e7fa68f`](https://github.com/apache/spark/commit/e7fa68feddebf05299de0f6d3b3513aeac02a241).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63399/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63673/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63711/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64279/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63820 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63820/consoleFull)** for PR 14447 at commit [`7c94e2b`](https://github.com/apache/spark/commit/7c94e2ba11655cbd9275793f6c069ab3ba844238).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    we are looking at establishing some guidelines in PR 14705. Let's hold on for another day or 2.



---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    @param ... Should be in mllib.R
    



---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63624/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    @keypointt could you please rebase this to master? Only 2 more comments.
    cc @mengxr 


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74692263
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -414,6 +421,94 @@ setMethod("predict", signature(object = "KMeansModel"),
                 return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
               })
     
    +#' Multilayer Perceptron Classification Model
    +#'
    +#' \code{spark.mlp} fits a multi-layer perceptron neural network model against a SparkDataFrame.
    +#' Users can call \code{summary} to print a summary of the fitted model, \code{predict} to make
    +#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load fitted models.
    +#' Only categorical data is supported.
    +#' For more details, see
    +#' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html
    +#' #multilayer-perceptron-classifier}{Multilayerperceptron classifier}.
    +#'
    +#' @param data A \code{SparkDataFrame} of observations and labels for model fitting
    +#' @param blockSize BlockSize parameter
    +#' @param layers Integer vector containing the number of nodes for each layer
    +#' @param solver Solver parameter, supported options: "gd" (minibatch gradient descent) or "l-bfgs"
    +#' @param maxIter Maximum iteration number
    +#' @param tol Convergence tolerance of iterations
    +#' @param stepSize StepSize parameter
    +#' @param seed Seed parameter for weights initialization
    +#' @return \code{spark.mlp} returns a fitted Multilayer Perceptron Classification Model
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @name spark.mlp
    +#' @seealso \link{read.ml}
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
    +#'
    +#' # fit a Multilayer Perceptron Classification Model
    +#' model <- spark.mlp(df, blockSize = 128, layers = c(4, 5, 4, 3), solver = "l-bfgs",
    +#'                    maxIter = 100, tol = 0.5, stepSize = 1, seed = 1)
    +#'
    +#' # get the summary of the model
    +#' summary(model)
    +#'
    +#' # make predictions
    +#' predictions <- predict(model, df)
    +#'
    +#' # save and load the model
    +#' path <- "path/to/model"
    +#' write.ml(model, path)
    +#' savedModel <- read.ml(path)
    +#' summary(savedModel)
    +#' }
    +#' @note spark.mlp since 2.1.0
    +setMethod("spark.mlp", signature(data = "SparkDataFrame"),
    +          function(data, blockSize = 128, layers = c(3, 5, 2), solver = "l-bfgs", maxIter = 100,
    +                   tol = 0.5, stepSize = 1, seed = 1, ...) {
    +            jobj <- callJStatic("org.apache.spark.ml.r.MultilayerPerceptronClassifierWrapper",
    +                                "fit", data@sdf, as.integer(blockSize), as.array(layers),
    +                                as.character(solver), as.integer(maxIter), as.numeric(tol),
    +                                as.numeric(stepSize), as.integer(seed))
    +            return(new("MultilayerPerceptronClassificationModel", jobj = jobj))
    +          })
    +
    +# Makes predictions from a model produced by spark.mlp().
    +
    +#' @param newData A SparkDataFrame for testing
    +#' @return \code{predict} returns a SparkDataFrame containing predicted labeled in a column named
    +#' "prediction"
    +#' @rdname spark.mlp
    +#' @aliases spark.mlp,SparkDataFrame-method
    +#' @export
    +#' @note predict(MultilayerPerceptronClassificationModel) since 2.1.0
    +setMethod("predict", signature(object = "MultilayerPerceptronClassificationModel"),
    +          function(object, newData) {
    +            return(dataFrame(callJMethod(object@jobj, "transform", newData@sdf)))
    +          })
    +
    +# Returns the summary of a Multilayer Perceptron Classification Model produced by \code{spark.mlp}
    +
    +#' @param object A Multilayer Perceptron Classification Model fitted by \code{spark.mlp}
    +#' @return \code{summary} returns a list containing \code{layers}, the label distribution, and
    +#'         \code{tables}, conditional probabilities given the target label
    +#' @rdname spark.mlp
    +#' @export
    +#' @aliases spark.mlp,SparkDataFrame-method
    --- End diff --
    
    same here
    `summary,MultilayerPerceptronClassificationModel-method`


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #63673 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63673/consoleFull)** for PR 14447 at commit [`f56b805`](https://github.com/apache/spark/commit/f56b8054b2ed22e5872eb443ddf968e47f07fa6b).


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Hi there - sorry about the delay. Could you please rebase to master and check out the refactoring [here](https://github.com/apache/spark/commit/0583ecda1b63a7e3f126c3276059e4f99548a741) and doc pattern [here](https://github.com/apache/spark/commit/01401e965b58f7e8ab615764a452d7d18f1d4bf0)
    
    I'll do another pass when you are ready. 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63300/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r75289396
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -533,6 +630,28 @@ setMethod("write.ml", signature(object = "KMeansModel", path = "character"),
                 invisible(callJMethod(writer, "save", path))
               })
     
    +# Saves the Multilayer Perceptron Classification Model to the input path.
    +
    +#' @param object A Multilayer Perceptron Classification Model fitted by \code{spark.mlp}
    +#' @param path The directory where the model is saved
    +#' @param overwrite Overwrites or not if the output path already exists. Default is FALSE
    +#'                  which means throw exception if the output path exists.
    +#'
    +#' @rdname spark.mlp
    +#' @aliases write.ml,MultilayerPerceptronClassificationModel,path-method
    --- End diff --
    
    I think this should be
    `#' @aliases write.ml,MultilayerPerceptronClassificationModel,character-method`


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64274/
    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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    **[Test build #64279 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64279/consoleFull)** for PR 14447 at commit [`067f8fd`](https://github.com/apache/spark/commit/067f8fd110599d786ab44e66109f8af178133cc0).
     * 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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptron Class...

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

    https://github.com/apache/spark/pull/14447
  
    @keypointt The error is happening because of the `href` line in the `spark.mlp` documentation. If you move the opening brace to the previous line the error goes away. i.e. the code should look like
    ```
    #' \href{http://spark.apache.org/docs/latest/ml-classification-regression.html}{
    #'   Multilayer Perceptron}
    ```


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74529927
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -467,7 +560,7 @@ setMethod("spark.naiveBayes", signature(data = "SparkDataFrame", formula = "form
     #'
     #' @rdname spark.naiveBayes
     #' @export
    -#' @seealso \link{read.ml}
    +#' @seealso \link{write.ml}
    --- End diff --
    
    I think this was intentional to link to `read.ml`


---
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 #14447: [SPARK-16445][MLlib][SparkR] Multilayer Perceptro...

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

    https://github.com/apache/spark/pull/14447#discussion_r74529955
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -487,7 +580,7 @@ setMethod("write.ml", signature(object = "NaiveBayesModel", path = "character"),
     #' @rdname spark.survreg
     #' @export
     #' @note write.ml(AFTSurvivalRegressionModel, character) since 2.0.0
    -#' @seealso \link{read.ml}
    +#' @seealso \link{write.ml}
    --- End diff --
    
    same here, this was intentional to link to `read.ml`


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