Package

org.apache.flink.ml.metrics

distances

Permalink

package distances

Visibility
  1. Public
  2. All

Type Members

  1. class ChebyshevDistanceMetric extends DistanceMetric

    Permalink

    This class implements a Chebyshev distance metric.

    This class implements a Chebyshev distance metric. The class calculates the distance between the given vectors by finding the maximum difference between each coordinate.

    See also

    http://en.wikipedia.org/wiki/Chebyshev_distance

  2. class CosineDistanceMetric extends DistanceMetric

    Permalink

    This class implements a cosine distance metric.

    This class implements a cosine distance metric. The class calculates the distance between the given vectors by dividing the dot product of two vectors by the product of their lengths. We convert the result of division to a usable distance. So, 1 - cos(angle) is actually returned.

    See also

    http://en.wikipedia.org/wiki/Cosine_similarity

  3. trait DistanceMetric extends Serializable

    Permalink

    DistanceMeasure interface is used for object which determines distance between two points.

  4. class EuclideanDistanceMetric extends SquaredEuclideanDistanceMetric

    Permalink

    This class implements a Euclidean distance metric.

    This class implements a Euclidean distance metric. The metric calculates the distance between the given two vectors by summing the square root of the squared differences between each coordinate.

    http://en.wikipedia.org/wiki/Euclidean_distance

    If you don't care about the true distance and only need for comparison, SquaredEuclideanDistanceMetric will be faster because it doesn't calculate the actual square root of the distances.

    See also

    http://en.wikipedia.org/wiki/Euclidean_distance

  5. class ManhattanDistanceMetric extends DistanceMetric

    Permalink

    This class implements a Manhattan distance metric.

    This class implements a Manhattan distance metric. The class calculates the distance between the given vectors by summing the differences between each coordinate.

    See also

    http://en.wikipedia.org/wiki/Taxicab_geometry

  6. class MinkowskiDistanceMetric extends DistanceMetric

    Permalink

    This class implements a Minkowski distance metric.

    This class implements a Minkowski distance metric. The metric is a generalization of L(p) distances: Euclidean distance and Manhattan distance. If you need for a special case of p = 1 or p = 2, use ManhattanDistanceMetric, EuclideanDistanceMetric. This class is useful for high exponents.

    See also

    http://en.wikipedia.org/wiki/Minkowski_distance

  7. class SquaredEuclideanDistanceMetric extends DistanceMetric

    Permalink

    This class is like EuclideanDistanceMetric but it does not take the square root.

    This class is like EuclideanDistanceMetric but it does not take the square root.

    The value calculated by this class is not exact Euclidean distance, but it saves on computation when you need the value for only comparison.

  8. class TanimotoDistanceMetric extends DistanceMetric

    Permalink

    This class implements a Tanimoto distance metric.

    This class implements a Tanimoto distance metric. The class calculates the distance between the given vectors. The vectors are assumed as bit-wise vectors. We convert the result of division to a usable distance. So, 1 - similarity is actually returned.

    See also

    http://en.wikipedia.org/wiki/Jaccard_index

Value Members

  1. object ChebyshevDistanceMetric extends Serializable

    Permalink
  2. object CosineDistanceMetric extends Serializable

    Permalink
  3. object EuclideanDistanceMetric extends Serializable

    Permalink
  4. object ManhattanDistanceMetric extends Serializable

    Permalink
  5. object MinkowskiDistanceMetric extends Serializable

    Permalink
  6. object SquaredEuclideanDistanceMetric extends Serializable

    Permalink
  7. object TanimotoDistanceMetric extends Serializable

    Permalink

Ungrouped