|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractLocallyWeightedDistanceFunction<V,P>
de.lmu.ifi.dbs.elki.distance.distancefunction.KernelBasedLocallyWeightedDistanceFunction<V,P>
V
- the type of NumberVector to compute the distances in betweenP
- the type of Preprocessor usedpublic class KernelBasedLocallyWeightedDistanceFunction<V extends NumberVector<V,?>,P extends LocalPCAPreprocessor<V>>
Provides a kernel based locally weighted distance function. It is defined as follows: result = max{distP(P,Q), distQ(Q,P)}, where distP(P,Q) computes the quadratic form distance on the weak eigenvectors of the kernel matrix of P between two vectors P and Q in feature space. Computation of the distance component of the weak eigenvectors is done indirectly by computing the difference between the complete kernel distance and the distance component of the strong eigenvectors: distP(P,Q) = distP_weak(P,Q) = sqrt(distP_complete(P,Q)^2 - distP_strong(P,Q)^2) KP_complete(P,Q) is the kernel derived distance between P and Q. The distance component of the strong eigenvectors KP_strong(P,Q) is computed as follows: First, the vectors P and Q are projected onto the strong eigenvectors of the kernel matrix of P, which results in the two vectors Pp and Qp. Then, the euclidean distance is used to compute the distance between Pp and Qp. In case of the linear kernel function, this distance is identical to those computed by the LocallyWeightedDistanceFunction with parameters big = 1.0 and small = 0.0
Field Summary | |
---|---|
static Class<?> |
DEFAULT_KERNEL_FUNCTION_CLASS
The default kernel function. |
static OptionID |
KERNEL_FUNCTION_ID
OptionID for KERNEL_FUNCTION_PARAM |
private ObjectParameter<KernelFunction<V,DoubleDistance>> |
KERNEL_FUNCTION_PARAM
Parameter for the kernel function |
private KernelFunction<V,DoubleDistance> |
kernelFunction
The kernel function that is used. |
private KernelMatrix<V> |
kernelMatrix
The global precomputed kernel matrix |
Fields inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction |
---|
distanceFactory |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
KernelBasedLocallyWeightedDistanceFunction(Parameterization config)
Constructor, adhering to Parameterizable |
Method Summary | |
---|---|
private double |
computeDistance(V v1,
V v2)
Computes the distance between two given real vectors according to this distance function. |
DoubleDistance |
distance(V v1,
V v2)
Computes the distance between two given DatabaseObjects according to this distance function. |
AssociationID<Matrix> |
getAssociationID()
Returns the association ID for the association to be set by the preprocessor. |
void |
setDatabase(Database<V> database)
Set the database that holds the associations for the DatabaseObject for which the measurements should be computed. |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractLocallyWeightedDistanceFunction |
---|
getDefaultPreprocessorClass, getPreprocessorDescription, getPreprocessorSuperClass |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction |
---|
distance, distance |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction |
---|
getDatabase, getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance, valueOf |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction |
---|
distance, distance |
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.MeasurementFunction |
---|
getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance, valueOf |
Field Detail |
---|
public static final Class<?> DEFAULT_KERNEL_FUNCTION_CLASS
public static final OptionID KERNEL_FUNCTION_ID
KERNEL_FUNCTION_PARAM
private ObjectParameter<KernelFunction<V extends NumberVector<V,?>,DoubleDistance>> KERNEL_FUNCTION_PARAM
private KernelFunction<V extends NumberVector<V,?>,DoubleDistance> kernelFunction
private KernelMatrix<V extends NumberVector<V,?>> kernelMatrix
Constructor Detail |
---|
public KernelBasedLocallyWeightedDistanceFunction(Parameterization config)
Parameterizable
config
- ParameterizationMethod Detail |
---|
public DoubleDistance distance(V v1, V v2)
v1
- first DatabaseObjectv2
- second DatabaseObject
private double computeDistance(V v1, V v2)
v1
- first FeatureVectorv2
- second FeatureVector
public void setDatabase(Database<V> database)
MeasurementFunction
setDatabase
in interface MeasurementFunction<V extends NumberVector<V,?>,DoubleDistance>
setDatabase
in class AbstractLocallyWeightedDistanceFunction<V extends NumberVector<V,?>,P extends LocalPCAPreprocessor<V>>
database
- Databasepublic AssociationID<Matrix> getAssociationID()
AssociationID.STRONG_EIGENVECTOR_MATRIX
.
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |