To provide the most recent news and documentation www.pymvpa.org reflects the development 2.0 series (renamed 0.6 series) of PyMVPA. If you are interested in the documentation of the previous stable 0.4 series of PyMVPA, please visit v04.pymvpa.org.

mvpa2.clfs.distance.mahalanobis_distance

mvpa2.clfs.distance.mahalanobis_distance(x, y=None, w=None)

Calculate Mahalanobis distance of the pairs of points.

Parameters :

`x` :

first list of points. Rows are samples, columns are features.

`y` :

second list of points (optional)

`w` : np.ndarray

optional inverse covariance matrix between the points. It is computed if not given

Inverse covariance matrix can be calculated with the following :

w = np.linalg.solve(np.cov(x.T), np.identity(x.shape[1]))

or :

w = np.linalg.inv(np.cov(x.T))

NeuroDebian

NITRC-listed