I - type of the itemsF - type of the featurespublic abstract class VectorFeatureItemDistanceModel<I,F> extends FeatureItemDistanceModel<I,F,Double>
| Constructor and Description |
|---|
VectorFeatureItemDistanceModel(FeatureData<I,F,Double> featureData)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract 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.
|
ToDoubleFunction<Stream<org.jooq.lambda.tuple.Tuple2<F,Double>>> |
dist(Stream<org.jooq.lambda.tuple.Tuple2<F,Double>> features1)
Returns a function that returns the feature-based similarity to the
features of an item.
|
distclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdistpublic VectorFeatureItemDistanceModel(FeatureData<I,F,Double> featureData)
featureData - feature datapublic ToDoubleFunction<Stream<org.jooq.lambda.tuple.Tuple2<F,Double>>> dist(Stream<org.jooq.lambda.tuple.Tuple2<F,Double>> features1)
dist in class FeatureItemDistanceModel<I,F,Double>features1 - stream of features of an itemprotected abstract double dist(double prod,
double norm2A,
double norm2B)
prod - inner product of two vectorsnorm2A - square norm of the first vectornorm2B - square norm of the second vectorCopyright © 2016. All rights reserved.