de.lmu.ifi.dbs.elki.distance.distancefunction.subspace
Class SubspaceDistanceFunction<V extends NumberVector<V,?>,P extends LocalPCAPreprocessor<V>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPreprocessorBasedDistanceFunction<V,P,SubspaceDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.SubspaceDistanceFunction<V,P>
- Type Parameters:
V
- the type of NumberVector to compute the distances in betweenP
- the type of Preprocessor used
- All Implemented Interfaces:
- DistanceFunction<V,SubspaceDistance>, LocalPCAPreprocessorBasedDistanceFunction<V,P,SubspaceDistance>, PreprocessorBasedDistanceFunction<V,P,SubspaceDistance>, MeasurementFunction<V,SubspaceDistance>, PreprocessorBasedMeasurementFunction<V,P,SubspaceDistance>, PreprocessorClient<P,V>, Parameterizable
public class SubspaceDistanceFunction<V extends NumberVector<V,?>,P extends LocalPCAPreprocessor<V>>
- extends AbstractPreprocessorBasedDistanceFunction<V,P,SubspaceDistance>
- implements LocalPCAPreprocessorBasedDistanceFunction<V,P,SubspaceDistance>
Provides a distance function to determine a kind of correlation distance
between two points, which is a pair consisting of the distance between the
two subspaces spanned by the strong eigenvectors of the two points and the
affine distance between the two subspaces.
- Author:
- Elke Achtert
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubspaceDistanceFunction
public SubspaceDistanceFunction(Parameterization config)
- Constructor, adhering to
Parameterizable
- Parameters:
config
- Parameterization
getDefaultPreprocessorClass
public Class<?> getDefaultPreprocessorClass()
- Description copied from interface:
PreprocessorClient
- Returns the name of the default preprocessor.
- Specified by:
getDefaultPreprocessorClass
in interface PreprocessorClient<P extends LocalPCAPreprocessor<V>,V extends NumberVector<V,?>>
- Returns:
- the name of the default preprocessor, which is
KnnQueryBasedLocalPCAPreprocessor
getPreprocessorDescription
public final String getPreprocessorDescription()
- Description copied from interface:
PreprocessorClient
- Returns the description for the preprocessor parameter.
- Specified by:
getPreprocessorDescription
in interface PreprocessorClient<P extends LocalPCAPreprocessor<V>,V extends NumberVector<V,?>>
- Returns:
- the description for the preprocessor parameter
getPreprocessorSuperClass
public Class<P> getPreprocessorSuperClass()
- Description copied from interface:
PreprocessorClient
- Returns the super class for the preprocessor parameter.
- Specified by:
getPreprocessorSuperClass
in interface PreprocessorClient<P extends LocalPCAPreprocessor<V>,V extends NumberVector<V,?>>
- Returns:
- the super class for the preprocessor, which is
Preprocessor
getAssociationID
public AssociationID<?> getAssociationID()
- Description copied from interface:
PreprocessorClient
- Returns the association ID for the association to be set by the
preprocessor.
- Specified by:
getAssociationID
in interface PreprocessorClient<P extends LocalPCAPreprocessor<V>,V extends NumberVector<V,?>>
- Returns:
- the association ID for the association to be set by the
preprocessor, which is
AssociationID.LOCAL_PCA
distance
public SubspaceDistance distance(V o1,
V o2)
- Note, that the pca of o1 must have equal ore more strong eigenvectors than
the pca of o2.
- Specified by:
distance
in interface DistanceFunction<V extends NumberVector<V,?>,SubspaceDistance>
- Parameters:
o1
- first DatabaseObjecto2
- second DatabaseObject
- Returns:
- the distance between two given DatabaseObjects according to this
distance function
distance
public SubspaceDistance distance(V o1,
V o2,
PCAFilteredResult pca1,
PCAFilteredResult pca2)
- Computes the distance between two given DatabaseObjects according to this
distance function. Note, that the first pca must have an equal number of
strong eigenvectors than the second pca.
- Parameters:
o1
- first DatabaseObjecto2
- second DatabaseObjectpca1
- first PCApca2
- second PCA
- Returns:
- the distance between two given DatabaseObjects according to this
distance function