class_docstr: Change of Basis class.
docstr: Builds a ChangeOfBasis object.
  
  Args:
      tensor_size (int): Size of the tensor.
      n_cob (int): Number of change of basis matrices.
      cob_prob (float): Probability of applying a change of basis.
      device (str): Name of the torch device to use.
      random_seed (int, optional): Random seed for reproducibility.
code: def __init__(
      self,
      tensor_size: int,
      n_cob: int,
      cob_prob: float,
      device: str,
      random_seed: int = None,
  ):
      """Builds a ChangeOfBasis object.
  
      Args:
          tensor_size (int): Size of the tensor.
          n_cob (int): Number of change of basis matrices.
          cob_prob (float): Probability of applying a change of basis.
          device (str): Name of the torch device to use.
          random_seed (int, optional): Random seed for reproducibility.
      """
      self.tmp_dir = Path.home() / ".data_alpha_tensor/cob_matrices"
      self.tmp_dir.mkdir(exist_ok=True, parents=True)
      for i, cob_matrix in enumerate(
          get_change_basis_matrix(
              tensor_size,
              n_cob,
              cob_entry_prob_distribution,
              random_seed,
          )
      ):
          torch.save(cob_matrix, f"{self.tmp_dir}/cob_matrix_{i}.pt")
      self.tensor_size = tensor_size
      self.n_cob = n_cob
      self.cob_prob = cob_prob
      self.device = device
  
file_path: nebuly/optimization/open_alpha_tensor/open_alpha_tensor/core/data/basis_change.py
imports: from pathlib import Path
  from typing import Callable
  import numpy
  import torch
label_desc: Use image node_id 1 to create a new ChangeOfBasis object  with example: obj = ChangeOfBasis(tensor_size, n_cob, cob_prob, device, random_seed)