class_docstr: CP Decomposition via Robust Tensor Power Iteration
  
  Parameters
  ----------
  tensor : tl.tensor
      input tensor to decompose
  rank : int
      rank of the decomposition (number of rank-1 components)
  n_repeat : int, default is 10
      number of initializations to be tried
  n_iteration : int, default is 10
      number of power iterations
  verbose : bool
      level of verbosity
  
  Returns
  -------
  (weights, factors)
  
  weights : 1-D tl.tensor of length `rank`
      contains the eigenvalue of each eigenvector
  factors : list of 2-D tl.tensor of shape (size, rank)
      Each column of each factor corresponds to one eigenvector
docstr: Decompose an input tensor
  
  Parameters
  ----------
  tensor : tensorly tensor
      input tensor to decompose
  
  Returns
  -------
  CPTensor
      decomposed tensor
code: def fit_transform(self, tensor):
      """Decompose an input tensor
  
      Parameters
      ----------
      tensor : tensorly tensor
          input tensor to decompose
  
      Returns
      -------
      CPTensor
          decomposed tensor
      """
      cp_tensor = parafac_power_iteration(
          tensor,
          rank=self.rank,
          n_repeat=self.n_repeat,
          n_iteration=self.n_iteration,
          verbose=self.verbose,
      )
      self.decomposition_ = cp_tensor
      return cp_tensor
  
file_path: tensorly/tensorly/decomposition/_cp_power.py
imports: import tensorly
  from ._base_decomposition import DecompositionMixin
  from ..cp_tensor import validate_cp_rank
  from tensorly.tenalg import outer
  import numpy
label_desc: Use image node_id 2 for calling the CPPower obj's underlying member method code with example usage: obj.fit_transform(tensor) and returns: cp_tensor