public abstract class WordWeighting extends IndexFunction
Constructor and Description |
---|
WordWeighting() |
Modifier and Type | Method and Description |
---|---|
abstract void |
applyTo(Vec vec)
The implementation may want to pre compute come values based on the
vector it is about to be applied to.
|
abstract void |
setWeight(List<? extends Vec> allDocuments,
List<Integer> df)
Prepares the word weighting to be performed on a data set.
|
f, f, indexFunc
public abstract void setWeight(List<? extends Vec> allDocuments, List<Integer> df)
allDocuments
- the list of all vectors that make up the set of
documents. The word vectors should be unmodified, containing the value of
how many times a word appeared in the document for each index.df
- a list mapping each integer index of a word to how many times
that word occurred in totalpublic abstract void applyTo(Vec vec)
Vec.applyIndexFunction(jsat.math.IndexFunction)
. The vector
should be in a bag-of-words form where each index value indicates how
many times the word for that index occurred in the document represented
by the vector.vec
- the vector to set up for and then alter by invoking
Vec.applyIndexFunction(jsat.math.IndexFunction)
onCopyright © 2017. All rights reserved.