public class IDFModel
extends java.lang.Object
implements scala.Serializable
Modifier and Type | Method and Description |
---|---|
Vector |
idf() |
JavaRDD<Vector> |
transform(JavaRDD<Vector> dataset)
Transforms term frequency (TF) vectors to TF-IDF vectors (Java version).
|
RDD<Vector> |
transform(RDD<Vector> dataset)
Transforms term frequency (TF) vectors to TF-IDF vectors.
|
Vector |
transform(Vector v)
Transforms a term frequency (TF) vector to a TF-IDF vector
|
public Vector idf()
public RDD<Vector> transform(RDD<Vector> dataset)
If minDocFreq
was set for the IDF calculation,
the terms which occur in fewer than minDocFreq
documents will have an entry of 0.
dataset
- an RDD of term frequency vectorspublic Vector transform(Vector v)
v
- a term frequency vector