[GitHub] spark pull request #16922: [SPARK-19590][pyspark][ML] Update the document fo...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/16922 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #16922: [SPARK-19590][pyspark][ML] Update the document fo...
Github user VinceShieh commented on a diff in the pull request: https://github.com/apache/spark/pull/16922#discussion_r101183452 --- Diff: python/pyspark/ml/feature.py --- @@ -1178,7 +1178,17 @@ class QuantileDiscretizer(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadab `QuantileDiscretizer` takes a column with continuous features and outputs a column with binned categorical features. The number of bins can be set using the :py:attr:`numBuckets` parameter. -The bin ranges are chosen using an approximate algorithm (see the documentation for +It is possible that the number of buckets used will be less than this value, for example, if +there are too few distinct values of the input to create enough distinct quantiles. + +NaN handling: Note also that +QuantileDiscretizer will raise an error when it finds NaN values in the dataset, but the user +can also choose to either keep or remove NaN values within the dataset by setting +`handleInvalid`. If the user chooses to keep NaN values, they will be handled specially and --- End diff -- yeah, sure. Thanks for pointing that out... ;) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #16922: [SPARK-19590][pyspark][ML] Update the document fo...
Github user holdenk commented on a diff in the pull request: https://github.com/apache/spark/pull/16922#discussion_r101097983 --- Diff: python/pyspark/ml/feature.py --- @@ -1178,7 +1178,17 @@ class QuantileDiscretizer(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadab `QuantileDiscretizer` takes a column with continuous features and outputs a column with binned categorical features. The number of bins can be set using the :py:attr:`numBuckets` parameter. -The bin ranges are chosen using an approximate algorithm (see the documentation for +It is possible that the number of buckets used will be less than this value, for example, if +there are too few distinct values of the input to create enough distinct quantiles. + +NaN handling: Note also that +QuantileDiscretizer will raise an error when it finds NaN values in the dataset, but the user +can also choose to either keep or remove NaN values within the dataset by setting +`handleInvalid`. If the user chooses to keep NaN values, they will be handled specially and --- End diff -- could we maybe link this with a py attr like we did with numBuckets? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #16922: [SPARK-19590][pyspark][ML] update the document fo...
GitHub user VinceShieh opened a pull request: https://github.com/apache/spark/pull/16922 [SPARK-19590][pyspark][ML] update the document for QuantileDiscretize⦠## What changes were proposed in this pull request? This PR is to document the changes on QuantileDiscretizer in pyspark for PR: https://github.com/apache/spark/pull/15428 ## How was this patch tested? No test needed Signed-off-by: VinceShiehYou can merge this pull request into a Git repository by running: $ git pull https://github.com/VinceShieh/spark spark-19590 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16922.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16922 commit 25bdc0f09f763b993ff78cb6f86a4a567eae4872 Author: VinceShieh Date: 2017-02-14T04:37:43Z [SPARK-19590][pyspark][ML] update the document for QuantileDiscretizer in pyspark This PR is to document the change on QuantileDiscretizer in pyspark for PR: https://github.com/apache/spark/pull/15428 Signed-off-by: VinceShieh --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org