public static class PCABasedCorrelationDistanceFunction.Instance<V extends NumberVector<?,?>> extends AbstractIndexBasedDistanceFunction.Instance<V,FilteredLocalPCAIndex<V>,PCACorrelationDistance,PCABasedCorrelationDistanceFunction> implements FilteredLocalPCABasedDistanceFunction.Instance<V,FilteredLocalPCAIndex<V>,PCACorrelationDistance>
Modifier and Type | Field and Description |
---|---|
(package private) double |
delta
Delta value
|
index, parent
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
PCABasedCorrelationDistanceFunction.Instance(Relation<V> database,
FilteredLocalPCAIndex<V> index,
double delta,
PCABasedCorrelationDistanceFunction distanceFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
adjust(Matrix v,
Matrix e_czech,
Vector vector,
int corrDim)
Inserts the specified vector into the given orthonormal matrix
v at column corrDim . |
int |
correlationDistance(PCAFilteredResult pca1,
PCAFilteredResult pca2,
int dimensionality)
Computes the correlation distance between the two subspaces defined by
the specified PCAs.
|
PCACorrelationDistance |
distance(DBIDRef id1,
DBIDRef id2)
Returns the distance between the two objects specified by their object ids.
|
private double |
euclideanDistance(V dv1,
V dv2)
Computes the Euclidean distance between the given two vectors.
|
getDistanceFunction, getIndex
distance, distance, distance
getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIndex
distance, distance, distance, getDistanceFactory, getDistanceFunction, getRelation, infiniteDistance, nullDistance, undefinedDistance
public PCABasedCorrelationDistanceFunction.Instance(Relation<V> database, FilteredLocalPCAIndex<V> index, double delta, PCABasedCorrelationDistanceFunction distanceFunction)
database
- Databaseindex
- Index to usedelta
- DeltadistanceFunction
- Distance functionpublic PCACorrelationDistance distance(DBIDRef id1, DBIDRef id2)
AbstractDistanceQuery
distance
in interface DistanceQuery<V extends NumberVector<?,?>,PCACorrelationDistance>
distance
in class AbstractDistanceQuery<V extends NumberVector<?,?>,PCACorrelationDistance>
id1
- first object idid2
- second object idpublic int correlationDistance(PCAFilteredResult pca1, PCAFilteredResult pca2, int dimensionality)
pca1
- first PCApca2
- second PCAdimensionality
- the dimensionality of the data spaceprivate void adjust(Matrix v, Matrix e_czech, Vector vector, int corrDim)
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.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