spd_learn.functional.ledoit_wolf#
- spd_learn.functional.ledoit_wolf(covariances: Tensor, shrinkage: Tensor, shrink_mat: Tensor, size: int) Tensor[source]#
Applies Ledoit-Wolf shrinkage to a batch of covariance matrices.
- Parameters:
covariances (Tensor) – A batch of covariance matrices with shape (…, n, n).
shrinkage (Tensor) – Unconstrained shrinkage parameters, which will be passed through a sigmoid function.
shrink_mat (Tensor) – The target “shrink” matrices, which are often identity matrices.
size (int) – The dimensionality of the covariance matrices.
- Returns:
The shrunken covariance matrices.
- Return type:
Tensor