de.lmu.ifi.dbs.elki.index.preprocessed.subspaceproj
Class AbstractSubspaceProjectionIndex<NV extends NumberVector<?,?>,D extends Distance<D>,P extends ProjectionResult>
java.lang.Object
de.lmu.ifi.dbs.elki.index.AbstractIndex<O>
de.lmu.ifi.dbs.elki.index.preprocessed.AbstractPreprocessorIndex<NV,P>
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
AbstractSubspaceProjectionIndex
public AbstractSubspaceProjectionIndex(Relation<NV> relation,
D epsilon,
DistanceFunction<NV,D> rangeQueryDistanceFunction,
int minpts)
- Constructor.
- Parameters:
relation
- Relationepsilon
- Maximum EpsilonrangeQueryDistanceFunction
- range queryminpts
- Minpts
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 pointneighbors
- the neighbors as query results of the given pointrelation
- the database for which the preprocessing is performed
- Returns:
- local subspace projection