You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gouravgupta92 <gi...@git.apache.org> on 2015/04/06 09:42:50 UTC

[GitHub] spark pull request: Update HashingTF.scala

GitHub user gouravgupta92 opened a pull request:

    https://github.com/apache/spark/pull/5373

    Update HashingTF.scala

    transform function should return SparseVector instead of Vector.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gouravgupta92/spark patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/5373.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 #5373
    
----
commit 621b50528dc0741e622d468834128ee1b492837f
Author: gouravgupta92 <go...@gmail.com>
Date:   2015-04-06T07:41:55Z

    Update HashingTF.scala
    
    transform function should return SparseVector instead of Vector.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: Update HashingTF.scala

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5373#issuecomment-89961906
  
    Can one of the admins verify this patch?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: Update HashingTF.scala

Posted by gouravgupta92 <gi...@git.apache.org>.
Github user gouravgupta92 closed the pull request at:

    https://github.com/apache/spark/pull/5373


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: Update HashingTF.scala

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5373#discussion_r27788906
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/HashingTF.scala ---
    @@ -47,7 +47,7 @@ class HashingTF(val numFeatures: Int) extends Serializable {
       /**
        * Transforms the input document into a sparse term frequency vector.
        */
    -  def transform(document: Iterable[_]): Vector = {
    +  def transform(document: Iterable[_]): SparseVector = {
    --- End diff --
    
    A `SparseVector` is a `Vector`. This promises the more specific subclass, but is it necessary?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org