mlpy.stats.partitioned_cov

mlpy.stats.partitioned_cov(x, y, c=None)[source]

Covariance of groups.

Partition the rows of x according to class labels in y and take the covariance of each group.

Parameters:

x : array_like, shape (n, dim)

The data to group, where n is the number of data points and dim is the dimensionality of each data point.

y : array_like, shape (n,)

The class label for each data point.

c : int

The number of components in y.

Returns:

cov : array_like

The covariance of each group.

Examples

>>> partitioned_cov()

Note

Adapted from Matlab:

Copyright (2010) Kevin Murphy and Matt Dunham
License: MIT

Warning

Implementation of this function is not finished yet.