Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/12200#discussion_r58743453
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/feature/CountVectorizer.scala ---
@@ -127,6 +146,9 @@ class CountVectorizer(override val uid: String)
/** @group setParam */
def setMinTF(value: Double): this.type = set(minTF, value)
+ /** @group setParam */
+ def setBinary(value: Boolean): this.type = set(binary, value)
+
setDefault(vocabSize -> (1 << 18), minDF -> 1)
--- End diff --
Yes agree with that
Sent from my iPhone
> On 6 Apr 2016, at 19:00, Bryan Cutler <[email protected]> wrote:
>
> In mllib/src/main/scala/org/apache/spark/ml/feature/CountVectorizer.scala:
>
> > @@ -127,6 +146,9 @@ class CountVectorizer(override val uid: String)
> > /** @group setParam */
> > def setMinTF(value: Double): this.type = set(minTF, value)
> >
> > + /** @group setParam */
> > + def setBinary(value: Boolean): this.type = set(binary, value)
> > +
> > setDefault(vocabSize -> (1 << 18), minDF -> 1)
> I think you should set the binary param default here. It does get called
in the trait, but imo a trait should not really be doing things like that and a
default value is better set by the class using it.
>
> â
> You are receiving this because you were mentioned.
> Reply to this email directly or view it on GitHub
>
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]