pairwisedist.pairwisedist
Description
Functions
|
Calculates the pairwise Jackknife-correlation distance matrix for a given array of n samples by p features, as described in (Heyer et al. 1999, Genome Res.). |
|
Calculates the pairwise Pearson-correlation distance matrix for a given array of n samples by p features. |
|
Calculates the pairwise sharpened cosine distance matrix for a given array of n samples by p features, as described in a since-deleted tweet by Brandon Rohrer. You can read more about sharpened cosine distance `here <https://github.com/brohrer/sharpened-cosine-similarity>_. The sharpened cosine distance ranges between 0 (highest similarity) and 1 (highest dissimilarity). :param data: an n-by-p numpy array of n samples by p features, to calculate pairwise distance on. :type data: np.ndarray :param sharpen_exponent: :type sharpen_exponent: float (default=16) :param exp_noise_floor: :type exp_noise_floor: float (default=0.1) :param rowvar: If True, calculates the pairwise distance between the rows of 'data'. If False, calculate the pairwise distance between the columns of 'data'. :type rowvar: bool (default=True) :param similarity: If False, returns a pairwise distance matrix (0 means closest, 1 means furthest). If True, returns a pairwise similarity matrix (1 means most similar, 0 means most different). :type similarity: bool (default=False) :return: an n-by-n numpy array of pairwise sharpened cosine distance scores. :rtype: np.ndarray. |
|
Calculates the pairwise Spearman-correlation distance matrix for a given array of n samples by p features. |
|
Calculates the pairwise YR1 distance matrix for a given array of n samples by p features, as described in (Son YS, Baek J 2008, Pattern Recognition Letters). |
|
Calculates the pairwise YS1 distance matrix for a given array of n samples by p features, as described in (Son YS, Baek J 2008, Pattern Recognition Letters). |