class_docstr: Gaussian Kernel Density Estimation.
  
  Args:
      dataset (Tensor | None, optional): Dataset on which to fit the KDE model. Defaults to None.
docstr: Calculate the unbiased covariance matrix.
  
  Args:
      tensor (Tensor): Input tensor from which covariance matrix is computed.
  
  Returns:
      Output covariance matrix.
docstr_tok: ["Calculate","the","unbiased","covariance","matrix",".","Args",":","tensor","(","Tensor",")",":","Input","tensor","from","which","covariance","matrix","is","computed",".","Returns",":","Output","covariance","matrix","."]
code: def cov(tensor: Tensor) -> Tensor:
      """Calculate the unbiased covariance matrix.
  
      Args:
          tensor (Tensor): Input tensor from which covariance matrix is computed.
  
      Returns:
          Output covariance matrix.
      """
      mean = torch.mean(tensor, dim=1)
      tensor -= mean[:, None]
      cov = torch.matmul(tensor, tensor.T) / (tensor.size(1) - 1)
      return cov
  
file_path: anomalib/src/anomalib/models/components/stats/kde.py
imports: from __future__ import annotations
  import math
  import torch
  from torch import Tensor
  from anomalib.models.components.base import DynamicBufferModule
label_desc: Use image node_id 4 for calling the GaussianKDE obj's underlying member method code with example usage: obj.cov(tensor) and returns: cov