class_docstr: Non-negative Tucker decomposition
  
  Uses HALS to update each factor columnwise and uses
  fista or active set algorithm to update the core, see [1]_
  
  Parameters
  ----------
  tensor : ndarray
  rank : None, int or int list
      size of the core tensor, ``(len(ranks) == tensor.ndim)``
      if int, the same rank is used for all modes
  n_iter_max : int
      maximum number of iteration
  init : {'svd', 'random'}, optional
  svd : str, default is 'truncated_svd'
      function to use to compute the SVD, acceptable values in tensorly.SVD_FUNS
  tol : float, optional
      tolerance: the algorithm stops when the variation in
      the reconstruction error is less than the tolerance
      Default: 1e-8
  sparsity_coefficients : array of float (as much as the number of modes)
      The sparsity coefficients are used for each factor
      If set to None, the algorithm is computed without sparsity
      Default: None
  core_sparsity_coefficient : array of float. This coefficient imposes sparsity on core
      when it is updated with fista.
      Default: None
  fixed_modes : array of integers (between 0 and the number of modes)
      Has to be set not to update a factor, 0 and 1 for U and V respectively
      Default: None
  verbose : boolean
      Indicates whether the algorithm prints the successive
      reconstruction errors or not
      Default: False
  normalize_factors : if True, aggregates the norms of the factors in the core.
  return_errors : boolean
      Indicates whether the algorithm should return all reconstruction errors
      and computation time of each iteration or not
      Default: False
  exact : If it is True, the HALS nnls subroutines give results with high precision but it has a higher computational cost.
      If it is False, the algorithm gives an approximate solution.
      Default: False
  algorithm : {'fista', 'active_set'}
      Non negative least square solution to update the core.
      Default: 'fista'
  
  Returns
  -------
  core : ndarray of size `ranks`
      core tensor of the Tucker decomposition
  factors : ndarray list
      list of factors of the Tucker decomposition.
      Its ``i``-th element is of shape ``(tensor.shape[i], ranks[i])``
  
  References
  ----------
  .. [1] tl.G.Kolda and B.W.Bader, "Tensor Decompositions and Applications",
  SIAM REVIEW, vol. 51, n. 3, pp. 455-500, 2009.
code: def __init__(
      self,
      rank=None,
      n_iter_max=100,
      init="svd",
      svd="truncated_svd",
      tol=1e-8,
      sparsity_coefficients=None,
      core_sparsity_coefficient=None,
      fixed_modes=None,
      random_state=None,
      verbose=False,
      normalize_factors=False,
      return_errors=False,
      exact=False,
      algorithm="fista",
  ):
      self.rank = rank
      self.n_iter_max = n_iter_max
      self.normalize_factors = normalize_factors
      self.init = init
      self.svd = svd
      self.tol = tol
      self.random_state = random_state
      self.verbose = verbose
      self.sparsity_coefficients = sparsity_coefficients
      self.core_sparsity_coefficient = core_sparsity_coefficient
      self.fixed_modes = fixed_modes
      self.return_errors = return_errors
      self.exact = exact
      self.algorithm = algorithm
  
imports: import tensorly
  from ._base_decomposition import DecompositionMixin
  from ..base import unfold
  from ..tenalg import multi_mode_dot, mode_dot
  from ..tucker_tensor import tucker_to_tensor, TuckerTensor, validate_tucker_rank, tucker_normalize
  from ..tenalg.proximal import hals_nnls, active_set_nnls, fista
  from math import sqrt
  import warnings
  from collections.abc import Iterable
  from ..tenalg.svd import svd_interface
label_desc: Use image node_id 1 to create a new Tucker_NN_HALS object from inherited base classes: DecompositionMixin with example: obj = Tucker_NN_HALS(rank, n_iter_max, init, svd, tol, sparsity_coefficients, core_sparsity_coefficient, fixed_modes, random_state, verbose, normalize_factors, return_errors, exact, algorithm)