class_docstr: Base class for NMF and MiniBatchNMF.
class_docstr_tok: ["Base","class","for","NMF","and","MiniBatchNMF","."]
code: def __init__(
      self,
      n_components="warn",
      *,
      init=None,
      beta_loss="frobenius",
      tol=1e-4,
      max_iter=200,
      random_state=None,
      alpha_W=0.0,
      alpha_H="same",
      l1_ratio=0.0,
      verbose=0,
  ):
      self.n_components = n_components
      self.init = init
      self.beta_loss = beta_loss
      self.tol = tol
      self.max_iter = max_iter
      self.random_state = random_state
      self.alpha_W = alpha_W
      self.alpha_H = alpha_H
      self.l1_ratio = l1_ratio
      self.verbose = verbose
  
imports: import itertools
  import time
  import warnings
  from abc import ABC
  from math import sqrt
  from numbers import Integral, Real
  import numpy
  import scipy.sparse
  from scipy import linalg
  from .._config import config_context
  from ..base import BaseEstimator, ClassNamePrefixFeaturesOutMixin, TransformerMixin, _fit_context
  from ..exceptions import ConvergenceWarning
  from ..utils import check_array, check_random_state, gen_batches, metadata_routing
  from ..utils._param_validation import Hidden, Interval, StrOptions, validate_params
  from ..utils.extmath import randomized_svd, safe_sparse_dot, squared_norm
  from ..utils.validation import check_is_fitted, check_non_negative
  from ._cdnmf_fast import _update_cdnmf_fast
label_desc: Use image node_id 1 to create a new _BaseNMF object from inherited base classes: ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator, ABC with example: obj = _BaseNMF(n_components)