diff options
author | vectorijk <jiangkai@gmail.com> | 2015-11-02 16:12:04 -0800 |
---|---|---|
committer | DB Tsai <dbt@netflix.com> | 2015-11-02 16:12:04 -0800 |
commit | c020f7d9d43548d27ae4a9564ba38981fd530cb1 (patch) | |
tree | 8dc46ed1b48d88852323747b2d86aedd1c770b64 /R/pkg | |
parent | ec03866a7ef2d0826520755d47c8c9480148a76c (diff) | |
download | spark-c020f7d9d43548d27ae4a9564ba38981fd530cb1.tar.gz spark-c020f7d9d43548d27ae4a9564ba38981fd530cb1.tar.bz2 spark-c020f7d9d43548d27ae4a9564ba38981fd530cb1.zip |
[SPARK-10592] [ML] [PySpark] Deprecate weights and use coefficients instead in ML models
Deprecated in `LogisticRegression` and `LinearRegression`
Author: vectorijk <jiangkai@gmail.com>
Closes #9311 from vectorijk/spark-10592.
Diffstat (limited to 'R/pkg')
-rw-r--r-- | R/pkg/R/mllib.R | 6 |
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)) |