de.lmu.ifi.dbs.elki.index.preprocessed.subspaceproj
Class AbstractSubspaceProjectionIndex<NV extends NumberVector<?,?>,D extends Distance<D>,P extends ProjectionResult>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.AbstractIndex<O>
      extended by de.lmu.ifi.dbs.elki.index.preprocessed.AbstractPreprocessorIndex<NV,P>
          extended by de.lmu.ifi.dbs.elki.index.preprocessed.subspaceproj.AbstractSubspaceProjectionIndex<NV,D,P>
Type Parameters:
NV - Vector type
All Implemented Interfaces:
Index, LocalProjectionIndex<NV,P>, SubspaceProjectionIndex<NV,P>, Result
Direct Known Subclasses:
FourCSubspaceIndex, PreDeConSubspaceIndex

@Title(value="Local PCA Preprocessor")
@Description(value="Materializes the local PCA and the locally weighted matrix of objects of a database.")
public abstract class AbstractSubspaceProjectionIndex<NV extends NumberVector<?,?>,D extends Distance<D>,P extends ProjectionResult>
extends AbstractPreprocessorIndex<NV,P>
implements SubspaceProjectionIndex<NV,P>

Abstract base class for a local PCA based index.


Nested Class Summary
static class AbstractSubspaceProjectionIndex.Factory<NV extends NumberVector<?,?>,D extends Distance<D>,I extends AbstractSubspaceProjectionIndex<NV,D,?>>
          Factory class
 
Field Summary
protected  D epsilon
          Contains the value of parameter epsilon;
protected  int minpts
          Holds the value of parameter minpts.
protected  DistanceFunction<NV,D> rangeQueryDistanceFunction
          The distance function for the variance analysis.
 
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
AbstractSubspaceProjectionIndex(Relation<NV> relation, D epsilon, DistanceFunction<NV,D> rangeQueryDistanceFunction, int minpts)
          Constructor.
 
Method Summary
protected abstract  P computeProjection(DBID id, List<DistanceResultPair<D>> neighbors, Relation<NV> relation)
          This method implements the type of variance analysis to be computed for a given point.
 P getLocalProjection(DBID objid)
          Get the precomputed local subspace for a particular object ID.
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

epsilon

protected D extends Distance<D> epsilon
Contains the value of parameter epsilon;


rangeQueryDistanceFunction

protected DistanceFunction<NV extends NumberVector<?,?>,D extends Distance<D>> rangeQueryDistanceFunction
The distance function for the variance analysis.


minpts

protected int minpts
Holds the value of parameter minpts.

Constructor Detail

AbstractSubspaceProjectionIndex

public AbstractSubspaceProjectionIndex(Relation<NV> relation,
                                       D epsilon,
                                       DistanceFunction<NV,D> rangeQueryDistanceFunction,
                                       int minpts)
Constructor.

Parameters:
relation - Relation
epsilon - Maximum Epsilon
rangeQueryDistanceFunction - range query
minpts - Minpts
Method Detail

preprocess

protected void preprocess()
Preprocessing step.


getLocalProjection

public P getLocalProjection(DBID objid)
Description copied from interface: SubspaceProjectionIndex
Get the precomputed local subspace for a particular object ID.

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

computeProjection

protected abstract P computeProjection(DBID id,
                                       List<DistanceResultPair<D>> neighbors,
                                       Relation<NV> relation)
This method implements the type of variance analysis to be computed for a given point.

Example1: for 4C, this method should implement a PCA for the given point. Example2: for PreDeCon, this method should implement a simple axis-parallel variance analysis.

Parameters:
id - the given point
neighbors - the neighbors as query results of the given point
relation - the database for which the preprocessing is performed
Returns:
local subspace projection

Release 0.4.0 (2011-09-20_1324)