yaw.core.math.cov_from_samples#

yaw.core.math.cov_from_samples(samples: ndarray[Any, dtype[_ScalarType_co]] | Sequence[ndarray[Any, dtype[_ScalarType_co]]], method: str, rowvar: bool = False, kind: str = 'full') ndarray[Any, dtype[_ScalarType_co]][source]#

Compute a joint covariance from a sequence of data samples.

These samples can be jackknife or bootstrap samples (etc.). If more than one set of samples is provided, the samples are concatenated along the second axis (default) or along the first axis if rowvar=True.

Parameters:
  • ( (samples) – obj`:NDArray`, Sequence[NDArray]): One or many sets of data samples. The number of samples must be identical.

  • method (str, optional) – The resampling method that generated the samples, see method.

  • rowvar (bool, optional) – Whether the each row represents an observable. Determines the concatenation for multiple input sample sets.

  • kind (str, optional) – Determines the kind of covariance computed, see kind.