|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.datasource.filter.AbstractConversionFilter<O,O> de.lmu.ifi.dbs.elki.datasource.filter.AbstractNormalization<SparseFloatVector> de.lmu.ifi.dbs.elki.datasource.filter.InverseDocumentFrequencyNormalization
public class InverseDocumentFrequencyNormalization
Normalization for text frequency vectors, using the inverse document frequency.
Field Summary | |
---|---|
(package private) Map<Integer,Number> |
idf
The IDF storage |
(package private) int |
objcnt
The number of objects in the dataset |
Constructor Summary | |
---|---|
InverseDocumentFrequencyNormalization()
Constructor. |
Method Summary | |
---|---|
protected SparseFloatVector |
filterSingleObject(SparseFloatVector featureVector)
Normalize a single instance. |
protected SimpleTypeInformation<? super SparseFloatVector> |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query. |
protected void |
prepareComplete()
Complete the initialization phase |
protected void |
prepareProcessInstance(SparseFloatVector featureVector)
Process a single object during initialization. |
protected boolean |
prepareStart(SimpleTypeInformation<SparseFloatVector> in)
Return "true" when the normalization needs initialization (two-pass filtering!) |
SparseFloatVector |
restore(SparseFloatVector featureVector)
Transforms a feature vector to the original attribute ranges. |
Methods inherited from class de.lmu.ifi.dbs.elki.datasource.filter.AbstractNormalization |
---|
convertedType, normalizeObjects, toString, transform |
Methods inherited from class de.lmu.ifi.dbs.elki.datasource.filter.AbstractConversionFilter |
---|
filter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.datasource.filter.ObjectFilter |
---|
filter |
Field Detail |
---|
Map<Integer,Number> idf
int objcnt
Constructor Detail |
---|
public InverseDocumentFrequencyNormalization()
Method Detail |
---|
protected boolean prepareStart(SimpleTypeInformation<SparseFloatVector> in)
AbstractConversionFilter
prepareStart
in class AbstractConversionFilter<SparseFloatVector,SparseFloatVector>
in
- Input type information
protected void prepareProcessInstance(SparseFloatVector featureVector)
AbstractConversionFilter
prepareProcessInstance
in class AbstractConversionFilter<SparseFloatVector,SparseFloatVector>
featureVector
- Object to processprotected void prepareComplete()
AbstractConversionFilter
prepareComplete
in class AbstractConversionFilter<SparseFloatVector,SparseFloatVector>
protected SparseFloatVector filterSingleObject(SparseFloatVector featureVector)
AbstractConversionFilter
filterSingleObject
in class AbstractConversionFilter<SparseFloatVector,SparseFloatVector>
featureVector
- Database object to normalize
public SparseFloatVector restore(SparseFloatVector featureVector)
Normalization
featureVector
- a feature vector to be transformed into original space
protected SimpleTypeInformation<? super SparseFloatVector> getInputTypeRestriction()
AbstractConversionFilter
getInputTypeRestriction
in class AbstractConversionFilter<SparseFloatVector,SparseFloatVector>
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |