Skip to content

Commit 99d8944

Browse files
committed
[SPARK-16445] fix return description for mlp.summary
1 parent 78d5d4d commit 99d8944

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/pkg/R/mllib.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,9 @@ setMethod("predict", signature(object = "MultilayerPerceptronClassificationModel
720720
# Returns the summary of a Multilayer Perceptron Classification Model produced by \code{spark.mlp}
721721

722722
#' @param object a Multilayer Perceptron Classification Model fitted by \code{spark.mlp}
723-
#' @return \code{summary} returns a list containing \code{layers}, the label distribution, and
724-
#' \code{tables}, conditional probabilities given the target label.
723+
#' @return \code{summary} returns a list containing \code{labelCount}, \code{layers}, and
724+
#' \code{weights}. For \code{weights}, it is a numeric vector with length equal to
725+
#' the expected given the architecture (i.e., for 8-10-2 network, 100 connection weights).
725726
#' @rdname spark.mlp
726727
#' @export
727728
#' @aliases summary,MultilayerPerceptronClassificationModel-method
@@ -732,7 +733,6 @@ setMethod("summary", signature(object = "MultilayerPerceptronClassificationModel
732733
labelCount <- callJMethod(jobj, "labelCount")
733734
layers <- unlist(callJMethod(jobj, "layers"))
734735
weights <- callJMethod(jobj, "weights")
735-
weights <- matrix(weights, nrow = length(weights))
736736
list(labelCount = labelCount, layers = layers, weights = weights)
737737
})
738738

0 commit comments

Comments
 (0)