@PublicationReference(author="Susan T. Dumais", title="Improving the retrieval of information from external sources", year=1991, type=Journal, publication="Behavior Research Methods, Instruments, and Computers", pages={229,236}, url="http://www.google.com/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fwww.psychonomic.org%2Fsearch%2Fview.cgi%3Fid%3D5145&ei=o7joSdGEHY-itgPLre3tAQ&usg=AFQjCNEvm6PZEL6_Hk3XThI6DQ-gGx9EnQ&sig2=-gjFzNroJQirwGtwjaJvgQ") public class EntropyGlobalTermWeighter extends AbstractEntropyBasedGlobalTermWeighter
| Modifier and Type | Field and Description |
|---|---|
protected Vector |
entropy
A vector caching the global entropy weight of the document collection.
|
termEntropiesSumdocumentCount, termDocumentFrequencies, termGlobalFrequenciesvectorFactory| Constructor and Description |
|---|
EntropyGlobalTermWeighter()
Creates a new
EntropyGlobalTermWeighter. |
EntropyGlobalTermWeighter(VectorFactory<? extends Vector> vectorFactory)
Creates a new
EntropyGlobalTermWeighter. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Vector counts)
Adds a document to the model.
|
EntropyGlobalTermWeighter |
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 |
getEntropy()
Gets the entropy 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 |
setEntropy(Vector entropy)
Sets the cached entropy 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 entropy
public EntropyGlobalTermWeighter()
EntropyGlobalTermWeighter.public EntropyGlobalTermWeighter(VectorFactory<? extends Vector> vectorFactory)
EntropyGlobalTermWeighter.vectorFactory - The vector factory to use.public EntropyGlobalTermWeighter 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 int getDimensionality()
GlobalTermWeighterpublic Vector getGlobalWeights()
GlobalTermWeighterpublic Vector getEntropy()
protected void setEntropy(Vector entropy)
entropy - The cached entropy weight vector.