I
- type of the itemsF
- type of the featurespublic class CosineFeatureItemDistanceModel<I,F> extends VectorFeatureItemDistanceModel<I,F>
Constructor and Description |
---|
CosineFeatureItemDistanceModel(FeatureData<I,F,Double> featureData)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected double |
dist(double prod,
double norm2A,
double norm2B)
Distance as a function of the inner product between feature vectors
and the square of the norms of these vectors.
|
dist
dist
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dist
public CosineFeatureItemDistanceModel(FeatureData<I,F,Double> featureData)
featureData
- feature dataprotected double dist(double prod, double norm2A, double norm2B)
VectorFeatureItemDistanceModel
dist
in class VectorFeatureItemDistanceModel<I,F>
prod
- inner product of two vectorsnorm2A
- square norm of the first vectornorm2B
- square norm of the second vectorCopyright © 2016. All rights reserved.