Re: pyspark vector

2017-04-25 Thread Nick Pentreath
Well the 3 in this case is the size of the sparse vector. This equates to the number of features, which for CountVectorizer (I assume that's what you're using) is also vocab size (number of unique terms). On Tue, 25 Apr 2017 at 04:06 Peyman Mohajerian wrote: > setVocabSize >

Re: pyspark vector

2017-04-24 Thread Peyman Mohajerian
setVocabSize On Mon, Apr 24, 2017 at 5:36 PM, Zeming Yu wrote: > Hi all, > > Beginner question: > > what does the 3 mean in the (3,[0,1,2],[1.0,1.0,1.0])? > > https://spark.apache.org/docs/2.1.0/ml-features.html > > id | texts | vector >

pyspark vector

2017-04-24 Thread Zeming Yu
Hi all, Beginner question: what does the 3 mean in the (3,[0,1,2],[1.0,1.0,1.0])? https://spark.apache.org/docs/2.1.0/ml-features.html id | texts | vector |-|--- 0 | Array("a", "b", "c")|