public class ERiCDistanceFunction extends AbstractIndexBasedDistanceFunction<NumberVector<?,?>,FilteredLocalPCAIndex<NumberVector<?,?>>,BitDistance> implements FilteredLocalPCABasedDistanceFunction<NumberVector<?,?>,FilteredLocalPCAIndex<NumberVector<?,?>>,BitDistance>
Modifier and Type | Class and Description |
---|---|
static class |
ERiCDistanceFunction.Instance<V extends NumberVector<?,?>>
The actual instance bound to a particular database.
|
static class |
ERiCDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
private double |
delta
Holds the value of
DELTA_ID . |
static OptionID |
DELTA_ID
Parameter to specify the threshold for approximate linear dependency: the
strong eigenvectors of q are approximately linear dependent from the strong
eigenvectors p if the following condition holds for all strong eigenvectors
q_i of q (lambda_q < lambda_p): q_i' * M^check_p * q_i <= delta^2, must be
a double equal to or greater than 0.
|
(package private) static Logging |
logger
Logger for debug.
|
private double |
tau
Holds the value of
TAU_ID . |
static OptionID |
TAU_ID
Parameter to specify the threshold for the maximum distance between two
approximately linear dependent subspaces of two objects p and q (lambda_q <
lambda_p) before considering them as parallel, must be a double equal to or
greater than 0.
|
indexFactory
INDEX_ID
Constructor and Description |
---|
ERiCDistanceFunction(IndexFactory<NumberVector<?,?>,FilteredLocalPCAIndex<NumberVector<?,?>>> indexFactory,
double delta,
double tau)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
approximatelyLinearDependent(PCAFilteredResult pca1,
PCAFilteredResult pca2)
Returns true, if the strong eigenvectors of the two specified pcas span up
the same space.
|
BitDistance |
distance(NumberVector<?,?> v1,
NumberVector<?,?> v2,
PCAFilteredResult pca1,
PCAFilteredResult pca2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
boolean |
equals(Object obj) |
BitDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
<T extends NumberVector<?,?>> |
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query.
|
getInputTypeRestriction, isMetric, isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputTypeRestriction, isMetric, isSymmetric
static Logging logger
public static final OptionID DELTA_ID
Default value: 0.1
Key: -ericdf.delta
public static final OptionID TAU_ID
Default value: 0.1
Key: -ericdf.tau
private double delta
DELTA_ID
.private double tau
TAU_ID
.public ERiCDistanceFunction(IndexFactory<NumberVector<?,?>,FilteredLocalPCAIndex<NumberVector<?,?>>> indexFactory, double delta, double tau)
indexFactory
- Index factory.delta
- Delta parametertau
- Tau parameterpublic BitDistance getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<NumberVector<?,?>,BitDistance>
getDistanceFactory
in class AbstractDatabaseDistanceFunction<NumberVector<?,?>,BitDistance>
public <T extends NumberVector<?,?>> ERiCDistanceFunction.Instance<T> instantiate(Relation<T> database)
FilteredLocalPCABasedDistanceFunction
instantiate
in interface DistanceFunction<NumberVector<?,?>,BitDistance>
instantiate
in interface FilteredLocalPCABasedDistanceFunction<NumberVector<?,?>,FilteredLocalPCAIndex<NumberVector<?,?>>,BitDistance>
database
- The representation to useprivate boolean approximatelyLinearDependent(PCAFilteredResult pca1, PCAFilteredResult pca2)
pca1
- first PCApca2
- second PCApublic BitDistance distance(NumberVector<?,?> v1, NumberVector<?,?> v2, PCAFilteredResult pca1, PCAFilteredResult pca2)
v1
- first DatabaseObjectv2
- second DatabaseObjectpca1
- first PCApca2
- second PCA