aboutsummaryrefslogtreecommitdiff
path: root/R/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'R/pkg')
-rw-r--r--R/pkg/R/mllib.R6
1 files changed, 3 insertions, 3 deletions
diff --git a/R/pkg/R/mllib.R b/R/pkg/R/mllib.R
index aadd5b8da5..60bfadb8e7 100644
--- a/R/pkg/R/mllib.R
+++ b/R/pkg/R/mllib.R
@@ -92,9 +92,9 @@ setMethod("summary", signature(x = "PipelineModel"),
function(x, ...) {
features <- callJStatic("org.apache.spark.ml.api.r.SparkRWrappers",
"getModelFeatures", x@model)
- weights <- callJStatic("org.apache.spark.ml.api.r.SparkRWrappers",
- "getModelWeights", x@model)
- coefficients <- as.matrix(unlist(weights))
+ coefficients <- callJStatic("org.apache.spark.ml.api.r.SparkRWrappers",
+ "getModelCoefficients", x@model)
+ coefficients <- as.matrix(unlist(coefficients))
colnames(coefficients) <- c("Estimate")
rownames(coefficients) <- unlist(features)
return(list(coefficients = coefficients))