mvpa2.datasets.sources.skl_data.skl_spd_matrix

mvpa2.datasets.sources.skl_data.skl_spd_matrix(n_dim, random_state=None)

Generate a random symmetric, positive-definite matrix.

Read more in the User Guide.

Parameters:

n_dim : int

The matrix dimension.

random_state : int, RandomState instance or None, optional (default=None)

If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random.

Returns:

X : array of shape [n_dim, n_dim]

The random symmetric, positive-definite matrix.

See also

make_sparse_spd_matrix

Notes

This function has been auto-generated by wrapping make_spd_matrix() from the sklearn package. The documentation of this function has been kept verbatim. Consequently, the actual return value is not as described in the documentation, but the data is returned as a PyMVPA dataset.