de.lmu.ifi.dbs.elki.distance.distancefunction.correlation
Class PCABasedCorrelationDistanceFunction.Instance<V extends NumberVector<?,?>>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDatabaseDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractIndexBasedDistanceFunction.Instance<V,FilteredLocalPCAIndex<V>,PCACorrelationDistance,PCABasedCorrelationDistanceFunction>
de.lmu.ifi.dbs.elki.distance.distancefunction.correlation.PCABasedCorrelationDistanceFunction.Instance<V>
- All Implemented Interfaces:
- DatabaseQuery, DistanceQuery<V,PCACorrelationDistance>, FilteredLocalPCABasedDistanceFunction.Instance<V,FilteredLocalPCAIndex<V>,PCACorrelationDistance>, IndexBasedDistanceFunction.Instance<V,FilteredLocalPCAIndex<V>,PCACorrelationDistance>
- Enclosing class:
- PCABasedCorrelationDistanceFunction
public static class PCABasedCorrelationDistanceFunction.Instance<V extends NumberVector<?,?>>
- extends AbstractIndexBasedDistanceFunction.Instance<V,FilteredLocalPCAIndex<V>,PCACorrelationDistance,PCABasedCorrelationDistanceFunction>
- implements FilteredLocalPCABasedDistanceFunction.Instance<V,FilteredLocalPCAIndex<V>,PCACorrelationDistance>
The actual instance bound to a particular database.
Field Summary |
(package private) double |
delta
Delta value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delta
final double delta
- Delta value
PCABasedCorrelationDistanceFunction.Instance
public PCABasedCorrelationDistanceFunction.Instance(Relation<V> database,
FilteredLocalPCAIndex<V> index,
double delta,
PCABasedCorrelationDistanceFunction distanceFunction)
- Constructor.
- Parameters:
database
- Databaseindex
- Index to usedelta
- DeltadistanceFunction
- Distance function
distance
public PCACorrelationDistance distance(DBID id1,
DBID id2)
- Description copied from class:
AbstractDistanceQuery
- Returns the distance between the two objects specified by their object ids.
- Specified by:
distance
in interface DistanceQuery<V extends NumberVector<?,?>,PCACorrelationDistance>
- Specified by:
distance
in class AbstractDistanceQuery<V extends NumberVector<?,?>,PCACorrelationDistance>
- Parameters:
id1
- first object idid2
- second object id
- Returns:
- the distance between the two objects specified by their object ids
correlationDistance
public int correlationDistance(PCAFilteredResult pca1,
PCAFilteredResult pca2,
int dimensionality)
- Computes the correlation distance between the two subspaces defined by
the specified PCAs.
- Parameters:
pca1
- first PCApca2
- second PCAdimensionality
- the dimensionality of the data space
- Returns:
- the correlation distance between the two subspaces defined by the
specified PCAs
adjust
private void adjust(Matrix v,
Matrix e_czech,
Matrix vector,
int corrDim)
- Inserts the specified vector into the given orthonormal matrix
v
at column corrDim
. After insertion the matrix
v
is orthonormalized and column corrDim
of
matrix e_czech
is set to the corrDim
-th unit
vector.
- Parameters:
v
- the orthonormal matrix of the eigenvectorse_czech
- the selection matrix of the strong eigenvectorsvector
- the vector to be insertedcorrDim
- the column at which the vector should be inserted
euclideanDistance
private double euclideanDistance(V dv1,
V dv2)
- Computes the Euclidean distance between the given two vectors.
- Parameters:
dv1
- first FeatureVectordv2
- second FeatureVector
- Returns:
- the Euclidean distance between the given two vectors