|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectorg.apache.spark.mllib.feature.HashingTF
public class HashingTF
:: Experimental :: Maps a sequence of terms to their term frequencies using the hashing trick.
param: numFeatures number of features (default: 2^20^)
| Constructor Summary | |
|---|---|
HashingTF()
|
|
HashingTF(int numFeatures)
|
|
| Method Summary | ||
|---|---|---|
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. |
|
|
transform(JavaRDD<D> dataset)
Transforms the input document to term frequency vectors (Java version). |
|
|
transform(RDD<D> dataset)
Transforms the input document to term frequency vectors. |
|
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashingTF(int numFeatures)
public HashingTF()
| Method Detail |
|---|
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)
public <D extends Iterable<?>> JavaRDD<Vector> transform(JavaRDD<D> dataset)
dataset - (undocumented)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||