Package org.tribuo.math.distance
Interface Distance
- All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,ProtoSerializable<org.tribuo.math.protos.DistanceProto>
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
,Serializable
- All Known Implementing Classes:
CosineDistance
,L1Distance
,L2Distance
public interface Distance
extends com.oracle.labs.mlrg.olcut.config.Configurable, ProtoSerializable<org.tribuo.math.protos.DistanceProto>, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, Serializable
Interface for distance functions.
Must be valid distance functions which are positive, symmetric, and obey the triangle inequality.
-
Field Summary
Fields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER
-
Method Summary
Modifier and TypeMethodDescriptiondouble
computeDistance
(SGDVector first, SGDVector second) Computes the distance between the two vectors.Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
Methods inherited from interface org.tribuo.protos.ProtoSerializable
serialize
Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable
getProvenance
-
Method Details
-
computeDistance
Computes the distance between the two vectors.- Parameters:
first
- The first vector.second
- The second vector.- Returns:
- The distance between them.
-