docstr: PyTorch backend for Mahalanobis detector.
  
  Parameters
  ----------
  min_eigenvalue
      Eigenvectors with eigenvalues below this value will be discarded.
  device
      Device type used. The default tries to use the GPU and falls back on CPU if needed.
      Can be specified by passing either ``'cuda'``, ``'gpu'``, ``'cpu'`` or an instance of
      ``torch.device``.
docstr_tok: ["PyTorch","backend","for","Mahalanobis","detector",".","Parameters","--","--","--","--","--","min_eigenvalue","Eigenvectors","with","eigenvalues","below","this","value","will","be","discarded",".","device","Device","type","used",".","The","default","tries","to","use","the","GPU","and","falls","back","on","CPU","if","needed",".","Can","be","specified","by","passing","either","``","'cuda","'","``",",","``","'gpu","'","``",",","``","'cpu","'","``","or","an","instance","of","``","torch.device","``","."]
code: def __init__(
      self,
      min_eigenvalue: float = 1e-6,
      device: TorchDeviceType = None,
  ):
      """PyTorch backend for Mahalanobis detector.
  
      Parameters
      ----------
      min_eigenvalue
          Eigenvectors with eigenvalues below this value will be discarded.
      device
          Device type used. The default tries to use the GPU and falls back on CPU if needed.
          Can be specified by passing either ``'cuda'``, ``'gpu'``, ``'cpu'`` or an instance of
          ``torch.device``.
      """
      super().__init__(device=device)
      self.min_eigenvalue = min_eigenvalue
  
file_path: alibi-detect/alibi_detect/od/pytorch/mahalanobis.py
imports: import torch
  from alibi_detect.od.pytorch.base import TorchOutlierDetector
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 1 to create a new MahalanobisTorch object from inherited base classes: TorchOutlierDetector with example: obj = MahalanobisTorch(min_eigenvalue, device)