de.lmu.ifi.dbs.elki.index.preprocessed.localpca
Class AbstractFilteredPCAIndex<NV extends NumberVector<? extends NV,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.AbstractIndex<O>
      extended by de.lmu.ifi.dbs.elki.index.preprocessed.AbstractPreprocessorIndex<NV,PCAFilteredResult>
          extended by de.lmu.ifi.dbs.elki.index.preprocessed.localpca.AbstractFilteredPCAIndex<NV>
Type Parameters:
NV - Vector type
All Implemented Interfaces:
Index, FilteredLocalPCAIndex<NV>, LocalProjectionIndex<NV,PCAFilteredResult>, Result
Direct Known Subclasses:
KNNQueryFilteredPCAIndex, RangeQueryFilteredPCAIndex

@Title(value="Local PCA Preprocessor")
@Description(value="Materializes the local PCA and the locally weighted matrix of objects of a database.")
public abstract class AbstractFilteredPCAIndex<NV extends NumberVector<? extends NV,?>>
extends AbstractPreprocessorIndex<NV,PCAFilteredResult>
implements FilteredLocalPCAIndex<NV>

Abstract base class for a local PCA based index.


Nested Class Summary
static class AbstractFilteredPCAIndex.Factory<NV extends NumberVector<NV,?>,I extends AbstractFilteredPCAIndex<NV>>
          Factory class
 
Field Summary
protected  PCAFilteredRunner<NV> pca
          PCA utility object.
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.preprocessed.AbstractPreprocessorIndex
storage
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.AbstractIndex
relation
 
Constructor Summary
AbstractFilteredPCAIndex(Relation<NV> relation, PCAFilteredRunner<NV> pca)
          Constructor.
 
Method Summary
 PCAFilteredResult getLocalProjection(DBID objid)
          Get the precomputed local PCA for a particular object ID.
protected abstract  List<DistanceResultPair<DoubleDistance>> objectsForPCA(DBID id)
          Returns the objects to be considered within the PCA for the specified query object.
protected  void preprocess()
          Preprocessing step.
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.preprocessed.AbstractPreprocessorIndex
getLogger
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.AbstractIndex
delete, deleteAll, getLongName, getPageFileStatistics, getShortName, insert, insertAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.index.Index
delete, deleteAll, getPageFileStatistics, insert, insertAll
 
Methods inherited from interface de.lmu.ifi.dbs.elki.result.Result
getLongName, getShortName
 

Field Detail

pca

protected final PCAFilteredRunner<NV extends NumberVector<? extends NV,?>> pca
PCA utility object.

Constructor Detail

AbstractFilteredPCAIndex

public AbstractFilteredPCAIndex(Relation<NV> relation,
                                PCAFilteredRunner<NV> pca)
Constructor.

Parameters:
relation - Relation to use
pca - PCA runner to use
Method Detail

preprocess

protected void preprocess()
Preprocessing step.


getLocalProjection

public PCAFilteredResult getLocalProjection(DBID objid)
Description copied from interface: FilteredLocalPCAIndex
Get the precomputed local PCA for a particular object ID.

Specified by:
getLocalProjection in interface FilteredLocalPCAIndex<NV extends NumberVector<? extends NV,?>>
Specified by:
getLocalProjection in interface LocalProjectionIndex<NV extends NumberVector<? extends NV,?>,PCAFilteredResult>
Parameters:
objid - Object ID
Returns:
Matrix

objectsForPCA

protected abstract List<DistanceResultPair<DoubleDistance>> objectsForPCA(DBID id)
Returns the objects to be considered within the PCA for the specified query object.

Parameters:
id - the id of the query object for which a PCA should be performed
Returns:
the list of the objects (i.e. the ids and the distances to the query object) to be considered within the PCA

Release 0.4.0 (2011-09-20_1324)