From 39d538dddf7d44bf4603c966d0f7b2c92f1e951a Mon Sep 17 00:00:00 2001
From: Yanbo Liang <ybliang8@gmail.com>
Date: Tue, 6 Sep 2016 03:30:37 -0700
Subject: [PATCH] [MINOR][ML] Correct weights doc of
 MultilayerPerceptronClassificationModel.

## What changes were proposed in this pull request?
```weights``` of ```MultilayerPerceptronClassificationModel``` should be the output weights of layers rather than initial weights, this PR correct it.

## How was this patch tested?
Doc change.

Author: Yanbo Liang <ybliang8@gmail.com>

Closes #14967 from yanboliang/mlp-weights.
---
 .../ml/classification/MultilayerPerceptronClassifier.scala      | 2 +-
 python/pyspark/ml/classification.py                             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mllib/src/main/scala/org/apache/spark/ml/classification/MultilayerPerceptronClassifier.scala b/mllib/src/main/scala/org/apache/spark/ml/classification/MultilayerPerceptronClassifier.scala
index 7264a99b47..88fe7cb4a6 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/classification/MultilayerPerceptronClassifier.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/classification/MultilayerPerceptronClassifier.scala
@@ -288,7 +288,7 @@ object MultilayerPerceptronClassifier
  *
  * @param uid uid
  * @param layers array of layer sizes including input and output layers
- * @param weights vector of initial weights for the model that consists of the weights of layers
+ * @param weights the weights of layers
  * @return prediction model
  */
 @Since("1.5.0")
diff --git a/python/pyspark/ml/classification.py b/python/pyspark/ml/classification.py
index d1522d78fa..b4c01fd5c4 100644
--- a/python/pyspark/ml/classification.py
+++ b/python/pyspark/ml/classification.py
@@ -1276,7 +1276,7 @@ class MultilayerPerceptronClassificationModel(JavaModel, JavaPredictionModel, Ja
     @since("2.0.0")
     def weights(self):
         """
-        vector of initial weights for the model that consists of the weights of layers.
+        the weights of layers.
         """
         return self._call_java("weights")
 
-- 
GitLab