public class HashingTF
extends Object
implements scala.Serializable
param: numFeatures number of features (default: 2^20^)
Modifier and Type | Method and Description |
---|---|
int |
indexOf(Object term)
Returns the index of the input term.
|
int |
numFeatures() |
Vector |
transform(Iterable<?> document)
Transforms the input document into a sparse term frequency vector (Java version).
|
Vector |
transform(scala.collection.Iterable<Object> document)
Transforms the input document into a sparse term frequency vector.
|
<D extends Iterable<?>> |
transform(JavaRDD<D> dataset)
Transforms the input document to term frequency vectors (Java version).
|
<D extends scala.collection.Iterable<Object>> |
transform(RDD<D> dataset)
Transforms the input document to term frequency vectors.
|
public int numFeatures()
public int indexOf(Object term)
term
- (undocumented)public Vector transform(scala.collection.Iterable<Object> document)
document
- (undocumented)public Vector transform(Iterable<?> document)
document
- (undocumented)public <D extends scala.collection.Iterable<Object>> RDD<Vector> transform(RDD<D> dataset)
dataset
- (undocumented)