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.

  • Method Details

    • computeDistance

      double computeDistance(SGDVector first, SGDVector second)
      Computes the distance between the two vectors.
      Parameters:
      first - The first vector.
      second - The second vector.
      Returns:
      The distance between them.