aesara.tensor.cov

Contents

aesara.tensor.cov#

aesara.tensor.cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None, aweights=None)[source]#

Calculate the covariance matrix.

Covariance indicates the level to which two variables vary together. If we examine N-dimensional samples, m = [x_1, x_2, ... x_N]^T, then the covariance matrix element C_{ij} is the covariance of x_i and x_j. The element C_{ii} is the variance of x_i. Code and docstring ported from numpy.

Parameters:
  • m (array_like) – A 2-D array containing multiple variables and observations. Each row of m represents a variable, and each column is observations of all those variables.

  • y (array_like, optional) – An additional set of variables and observations. y has the same form as that of m.

  • rowvar (bool, optional) – If rowvar is True (default), then each row represents a variable, with observations in the columns. Otherwise, the relationship is transposed: each column represents a variable, while the rows contain observations.

  • bias (bool, optional) – Default normalization (False) is by (N - 1), where N is the number of observations given (unbiased estimate). If bias is True, then normalization is by N. These values can be overridden by using the keyword ddof.

  • ddof (int, optional) – If not None the default value implied by bias is overridden. The default value is None.

Returns:

out

Return type:

The covariance matrix of the variables.