-
Notifications
You must be signed in to change notification settings - Fork 28.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-15040][ML][PYSPARK] Add Imputer to PySpark #17316
Conversation
cc @hhbyyh |
Test build #74667 has finished for PR 17316 at commit
|
Test build #74669 has finished for PR 17316 at commit
|
Test build #74672 has finished for PR 17316 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
python/pyspark/ml/feature.py
Outdated
.. note:: Experimental | ||
|
||
Imputation estimator for completing missing values, either using the mean or the median | ||
of the column in which the missing values are located. The input column should be of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Shall we change all the "column" to "columns" since we are supporting multiple columns now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do for Python and Scala doc
""" | ||
Gets the value of :py:attr:`outputCols` or its default value. | ||
""" | ||
return self.getOrDefault(self.outputCols) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reminds me we should add
require(get(inputCols).isDefined, "Input cols must be defined first.")
require(get(outputCols).isDefined, "Output cols must be defined first.")
in transformschema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need that? The first call to $(inputCols)
in validateAndTransformSchema
will just throw an error with Failed to find a default value ...
Test build #74874 has finished for PR 17316 at commit
|
Test build #75012 has finished for PR 17316 at commit
|
Merged to master. |
## What changes were proposed in this pull request? Add docs and examples for spark.ml.feature.Imputer. Currently scala and Java examples are included. Python example will be added after #17316 ## How was this patch tested? local doc generation and example execution Author: Yuhao Yang <[email protected]> Closes #17324 from hhbyyh/imputerdoc.
Add Python wrapper for
Imputer
feature transformer.How was this patch tested?
New doc tests and tweak to PySpark ML
tests.py