gudhi.point_cloud.dtm.DistanceToMeasure Class Reference

Public Member Functions

def __init__ (self, k, q=2, **kwargs)
 
def fit (self, X, y=None)
 
def transform (self, X)
 

Detailed Description

Class to compute the distance to the empirical measure defined by a point set, as introduced in :cite:`dtm`.

Constructor & Destructor Documentation

◆ __init__()

def gudhi.point_cloud.dtm.DistanceToMeasure.__init__ (   self,
  k,
  q = 2,
**  kwargs 
)
Args:
    k (int): number of neighbors (possibly including the point itself).
    q (float): order used to compute the distance to measure. Defaults to 2.
    kwargs: same parameters as :class:`~gudhi.point_cloud.knn.KNearestNeighbors`, except that
metric="neighbors" means that :func:`transform` expects an array with the distances
to the k nearest neighbors.

Member Function Documentation

◆ fit()

def gudhi.point_cloud.dtm.DistanceToMeasure.fit (   self,
  X,
  y = None 
)
Args:
    X (numpy.array): coordinates for mass points.

◆ transform()

def gudhi.point_cloud.dtm.DistanceToMeasure.transform (   self,
  X 
)
Args:
    X (numpy.array): coordinates for query points, or distance matrix if metric is "precomputed",
or distances to the k nearest neighbors if metric is "neighbors" (if the array has more
than k columns, the remaining ones are ignored).

Returns:
    numpy.array: a 1-d array with, for each point of X, its distance to the measure defined
    by the argument of :func:`fit`.

The documentation for this class was generated from the following file:
GUDHI  Version 3.3.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Tue Aug 11 2020 11:58:59 for GUDHI by Doxygen 1.8.18