[GitHub] spark pull request: [SPARK-13097][ML] Binarizer allowing Double AN...
Github user seddonm1 commented on the pull request: https://github.com/apache/spark/pull/10976#issuecomment-183506233 Thanks @mengxr. I have updated the pull request with your suggestions. I believe that we still need to use the .compressed even after moving the `if (value > td) {` so that we can 'Return a vector in either dense or sparse format, whichever uses less storage.' which will occur if all values in a dense vector are greater than the threshold. `Vectors.sparse(data.size, indices.result(), values.result()).compressed` --- 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: [SPARK-5891][ML] Binarizer allowing Double AND...
Github user seddonm1 commented on the pull request: https://github.com/apache/spark/pull/10976#issuecomment-176987322 Thanks @sethah. I was unsure if this was sufficiently different from the original code where they mentioned 'We need to discuss whether we should process multiple columns or a vector column.' I will raise a new Jira. --- 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: [SPARK-5891][ML] Binarizer allowing Double AND...
GitHub user seddonm1 opened a pull request: https://github.com/apache/spark/pull/10976 [SPARK-5891][ML] Binarizer allowing Double AND Vector input types This enhancement extends the existing SparkML Binarizer [SPARK-5891] to allow Vector in addition to the existing Double input column type. A use case for this enhancement is for when a user wants to Binarize many similar feature columns at once using the same threshold value (for example a binary threshold applied to many pixels in an image). This contribution is my original work and I license the work to the project under the project's open source license. @viirya @mengxr You can merge this pull request into a Git repository by running: $ git pull https://github.com/seddonm1/spark master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/10976.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 #10976 commit 3510d8d2d3d33eb0da7a9a7b1cc948fd8bb0a0ae Author: seddonm1 <seddo...@gmail.com> Date: 2016-01-29T05:49:26Z [SPARK-5891][ML] Binarizer allowing Double AND Vector inputs This change extends the existing SparkML Binarizer [SPARK-5891] to allow Vector in addition to the existing Double input columns. --- 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