Class SparseMinkowskiDistance

java.lang.Object
smile.math.distance.SparseMinkowskiDistance
All Implemented Interfaces:
Serializable, ToDoubleBiFunction<SparseArray,SparseArray>, Distance<SparseArray>, Metric<SparseArray>

public class SparseMinkowskiDistance extends Object implements Metric<SparseArray>
Minkowski distance of order p or Lp-norm, is a generalization of Euclidean distance that is actually L2-norm. You may also provide a specified weight vector.
See Also:
  • Constructor Details

    • SparseMinkowskiDistance

      public SparseMinkowskiDistance(int p)
      Constructor.
      Parameters:
      p - the order of Minkowski distance.
    • SparseMinkowskiDistance

      public SparseMinkowskiDistance(int p, double[] weight)
      Constructor.
      Parameters:
      p - the order of Minkowski distance.
      weight - the weight vector.
  • Method Details