Skip to content

Commit 65e7a02

Browse files
committed
address comment
1 parent 63959c9 commit 65e7a02

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ class VectorAssembler @Since("1.4.0") (@Since("1.4.0") override val uid: String)
7171
*/
7272
@Since("2.4.0")
7373
override val handleInvalid: Param[String] = new Param[String](this, "handleInvalid",
74-
"""Param for how to handle invalid data (NULL values). Options are 'skip' (filter out rows with
75-
|invalid data), 'error' (throw an error), or 'keep' (return relevant number of NaN in the
76-
|output). Column lengths are taken from the size of ML Attribute Group, which can be set using
77-
|`VectorSizeHint` in a pipeline before `VectorAssembler`. Column lengths can also be inferred
78-
|from first rows of the data since it is safe to do so but only in case of 'error' or 'skip'.
79-
|""".stripMargin.replaceAll("\n", " "),
74+
"""Param for how to handle invalid data (NULL and NaN values). Options are 'skip' (filter out
75+
|rows with invalid data), 'error' (throw an error), or 'keep' (return relevant number of NaN
76+
|in the output). Column lengths are taken from the size of ML Attribute Group, which can be
77+
|set using `VectorSizeHint` in a pipeline before `VectorAssembler`. Column lengths can also
78+
|be inferred from first rows of the data since it is safe to do so but only in case of 'error'
79+
|or 'skip'.""".stripMargin.replaceAll("\n", " "),
8080
ParamValidators.inArray(VectorAssembler.supportedHandleInvalids))
8181

8282
setDefault(handleInvalid, VectorAssembler.ERROR_INVALID)

python/pyspark/ml/feature.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,13 +2745,13 @@ class VectorAssembler(JavaTransformer, HasInputCols, HasOutputCol, HasHandleInva
27452745
"""
27462746

27472747
handleInvalid = Param(Params._dummy(), "handleInvalid", "How to handle invalid data (NULL " +
2748-
"values). Options are 'skip' (filter out rows with invalid data), " +
2749-
"'error' (throw an error), or 'keep' (return relevant number of NaN in " +
2750-
"the output). Column lengths are taken from the size of ML Attribute " +
2751-
"Group, which can be set using `VectorSizeHint` in a pipeline before " +
2752-
"`VectorAssembler`. Column lengths can also be inferred from first " +
2753-
"rows of the data since it is safe to do so but only in case of " +
2754-
"'error' or 'skip').",
2748+
"and NaN values). Options are 'skip' (filter out rows with invalid " +
2749+
"data), 'error' (throw an error), or 'keep' (return relevant number " +
2750+
"of NaN in the output). Column lengths are taken from the size of ML " +
2751+
"Attribute Group, which can be set using `VectorSizeHint` in a " +
2752+
"pipeline before `VectorAssembler`. Column lengths can also be " +
2753+
"inferred from first rows of the data since it is safe to do so but " +
2754+
"only in case of 'error' or 'skip').",
27552755
typeConverter=TypeConverters.toString)
27562756

27572757
@keyword_only

0 commit comments

Comments
 (0)