class_docstr: Principle Component Analysis (PCA).
  
  Args:
      n_components (float): Number of components. Can be either integer number of components
        or a ratio between 0-1.
code: def __init__(self, n_components: int | float):
      super().__init__()
      self.n_components = n_components
  
      self.register_buffer("singular_vectors", Tensor())
      self.register_buffer("mean", Tensor())
      self.register_buffer("num_components", Tensor())
  
      self.singular_vectors: Tensor
      self.singular_values: Tensor
      self.mean: Tensor
      self.num_components: Tensor
  
file_path: anomalib/src/anomalib/models/components/dimensionality_reduction/pca.py
imports: from __future__ import annotations
  import torch
  from torch import Tensor
  from anomalib.models.components.base import DynamicBufferModule
label_desc: Use image node_id 1 to create a new PCA object from inherited base classes: DynamicBufferModule with example: obj = PCA(n_components)