Classes | Functions
deep_sort::nn_matching Namespace Reference

Classes

class  NearestNeighborDistanceMetric

Functions

def _cosine_distance
def _nn_cosine_distance
def _nn_euclidean_distance
def _pdist

Function Documentation

def deep_sort.nn_matching._cosine_distance (   a,
  b,
  data_is_normalized = False 
) [private]
Compute pair-wise cosine distance between points in `a` and `b`.

Parameters
----------
a : array_like
    An NxM matrix of N samples of dimensionality M.
b : array_like
    An LxM matrix of L samples of dimensionality M.
data_is_normalized : Optional[bool]
    If True, assumes rows in a and b are unit length vectors.
    Otherwise, a and b are explicitly normalized to lenght 1.

Returns
-------
ndarray
    Returns a matrix of size len(a), len(b) such that eleement (i, j)
    contains the squared distance between `a[i]` and `b[j]`.

Definition at line 31 of file nn_matching.py.

def deep_sort.nn_matching._nn_cosine_distance (   x,
  y 
) [private]
Helper function for nearest neighbor distance metric (cosine).

Parameters
----------
x : ndarray
    A matrix of N row-vectors (sample points).
y : ndarray
    A matrix of M row-vectors (query points).

Returns
-------
ndarray
    A vector of length M that contains for each entry in `y` the
    smallest cosine distance to a sample in `x`.

Definition at line 78 of file nn_matching.py.

def deep_sort.nn_matching._nn_euclidean_distance (   x,
  y 
) [private]
Helper function for nearest neighbor distance metric (Euclidean).

Parameters
----------
x : ndarray
    A matrix of N row-vectors (sample points).
y : ndarray
    A matrix of M row-vectors (query points).

Returns
-------
ndarray
    A vector of length M that contains for each entry in `y` the
    smallest Euclidean distance to a sample in `x`.

Definition at line 57 of file nn_matching.py.

def deep_sort.nn_matching._pdist (   a,
  b 
) [private]
Compute pair-wise squared distance between points in `a` and `b`.

Parameters
----------
a : array_like
    An NxM matrix of N samples of dimensionality M.
b : array_like
    An LxM matrix of L samples of dimensionality M.

Returns
-------
ndarray
    Returns a matrix of size len(a), len(b) such that eleement (i, j)
    contains the squared distance between `a[i]` and `b[j]`.

Definition at line 5 of file nn_matching.py.



jsk_perception
Author(s): Manabu Saito, Ryohei Ueda
autogenerated on Tue Jul 2 2019 19:41:08