idl.tmt.representation.transformations
Class TermOccurrenceFilter
java.lang.Object
|
+--idl.tmt.representation.transformations.TermOccurrenceFilter
- All Implemented Interfaces:
- CollectionTransformation
- public class TermOccurrenceFilter
- extends java.lang.Object
- implements CollectionTransformation
Matrix transformation that filters columns (terms) out of the matrix
based on max or min occurrences. also filters the term list to match
the filtered matrix
Created on May 5, 2004
- Author:
- jelsas
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
minOccurrences
private double minOccurrences
hasBeenRun
private boolean hasBeenRun
termsBefore
private int termsBefore
termsAfter
private int termsAfter
TermOccurrenceFilter
public TermOccurrenceFilter(double minOccurrences)
TermOccurrenceFilter
public TermOccurrenceFilter()
filterTerms
private TmtMatrix filterTerms(double minOccurrences,
TmtMatrix matrix,
TermList termList)
getGlobalTermCounts
private DoubleMatrix2D getGlobalTermCounts(TmtMatrix matrix)
transformCollection
public void transformCollection(IndexedCollection collection)
- Description copied from interface:
CollectionTransformation
- general method for transforming the given collection. the
implementors should modify this colleciton object, not create
a new one.
- Specified by:
transformCollection in interface CollectionTransformation
- Following copied from interface:
idl.tmt.representation.transformations.CollectionTransformation
- Parameters:
collection -
makesMatrixDense
public boolean makesMatrixDense()
- Description copied from interface:
CollectionTransformation
- Indicates whether the modification to the collection by
this transformation makes the underlying matrix a dense matrix.
This method is used to indicated if the matrix should be written to
disk after this transformation is performed.
- Specified by:
makesMatrixDense in interface CollectionTransformation
- Following copied from interface:
idl.tmt.representation.transformations.CollectionTransformation
- Returns:
-
setMinOccurrences
public void setMinOccurrences(double minOccurrences)
getMinOccurrences
public double getMinOccurrences()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getStatus
public java.lang.String getStatus()
- Description copied from interface:
CollectionTransformation
- Provides a short string description of the collection
transformation. Implementors should return the
CollectionTransformation.STAUS_NONE
if the transformation has not yet been run.
- Specified by:
getStatus in interface CollectionTransformation