public class DominanceGlobalTermWeighter extends AbstractEntropyBasedGlobalTermWeighter
| Modifier and Type | Field and Description |
|---|---|
protected Vector |
dominance
A vector caching the global dominance weight of the document collection.
|
termEntropiesSumdocumentCount, termDocumentFrequencies, termGlobalFrequenciesvectorFactory| Constructor and Description |
|---|
DominanceGlobalTermWeighter()
Creates a new
DominanceGlobalTermWeighter. |
DominanceGlobalTermWeighter(VectorFactory<? extends Vector> vectorFactory)
Creates a new
DominanceGlobalTermWeighter. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Vector counts)
Adds a document to the model.
|
DominanceGlobalTermWeighter |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
int |
getDimensionality()
Gets the dimensionality of the global weights.
|
Vector |
getDominance()
Gets the dominance weight (global weight) vector for all of the terms.
|
Vector |
getGlobalWeights()
Gets the current vector of global weights.
|
boolean |
remove(Vector counts)
Removes the document from the model.
|
protected void |
setDominance(Vector dominance)
Sets the cached dominance weight vector.
|
getTermEntropiesSum, growVectors, initializeVectors, setTermEntropiesSumgetDocumentCount, getTermDocumentFrequencies, getTermGlobalFrequencies, setDocumentCount, setTermDocumentFrequencies, setTermGlobalFrequenciesgetVectorFactory, setVectorFactoryadd, addAll, remove, removeAllequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, addAll, remove, removeAllprotected Vector dominance
public DominanceGlobalTermWeighter()
DominanceGlobalTermWeighter.public DominanceGlobalTermWeighter(VectorFactory<? extends Vector> vectorFactory)
DominanceGlobalTermWeighter.vectorFactory - The vector factory.public DominanceGlobalTermWeighter clone()
AbstractCloneableSerializableObject class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone() to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone() as the basis for your implementation.clone in interface CloneableSerializableclone in class AbstractEntropyBasedGlobalTermWeighterpublic void add(Vector counts)
VectorSpaceModeladd in interface VectorSpaceModeladd in class AbstractEntropyBasedGlobalTermWeightercounts - Adds a document to the model.public boolean remove(Vector counts)
VectorSpaceModelremove in interface VectorSpaceModelremove in class AbstractEntropyBasedGlobalTermWeightercounts - The document to remove.public Vector getGlobalWeights()
GlobalTermWeighterpublic int getDimensionality()
GlobalTermWeighterpublic Vector getDominance()
protected void setDominance(Vector dominance)
dominance - The cached dominance weight vector.