mvpa2.clfs.distanceΒΆ

Distance functions to be used in kernels and elsewhere

Functions

absmin_distance(a, b) Returns dinstance max(|a-b|)
cartesian_distance(a, b) Return Cartesian distance between a and b
corouge(streamline1, streamline2) Mean of the mean min distances.
mahalanobis_distance(x[, y, w]) Calculate Mahalanobis distance of the pairs of points.
manhatten_distance(a, b) Return Manhatten distance between a and b
mean_min(streamline1, streamline2) Basic building block to compute several distances between streamlines.
one_minus_correlation(X, Y) Return one minus the correlation matrix between the rows of two matrices.
pnorm_w(data1[, data2, weight, p]) Weighted p-norm between two datasets (scipy.weave implementation)
pnorm_w_python(data1[, data2, weight, p, ...]) Weighted p-norm between two datasets (pure Python implementation) ||x - x’||_w = (sum_{i=1...N} (w_i*|x_i - x’_i|)**p)**(1/p) :Parameters: data1 : np.ndarray First dataset data2 : np.ndarray or None Optional second dataset weight : np.ndarray or None Optional weights per 2nd dimension (features) p : Power heuristic : str Which heuristic to use: * ‘samples’ – python sweep over 0th dim * ‘features’ – python sweep over 1st dim * ‘auto’ decides automatically.
squared_euclidean_distance(data1[, data2, ...]) Compute weighted euclidean distance matrix between two datasets.

NeuroDebian

NITRC-listed