Back to Numerical Arrays (NumPy)
np.cov
Estimate a covariance matrix.
Syntax
np.cov(m, y?, rowvar?, bias?, ddof?)
Description
Estimate a covariance matrix. Covariance indicates the level to which two variables vary together.
Parameters
| Name | Description |
|---|---|
| m | - A 1-D or 2-D array containing multiple variables and observations |
| y(optional) | - An additional set of variables and observations. Has the same shape as m. |
| rowvar(optional) | - If true, each row represents a variable, with observations in columns. If false, the relationship is transposed. |
| bias(optional) | - If false (default), normalization is by (N-1). If true, normalization is by N. |
| ddof(optional) | - If not null, this overrides the bias setting. ddof=1 gives unbiased estimate, ddof=0 gives biased estimate. |
Returns
Promise<NDArray>