class_docstr: Maximum independence domain adaptation
  Args:
      n_components (int): Number of components to keep.
      kernel (str): "linear", "rbf", or "poly". Kernel to use for MIDA. Defaults to "linear".
      mu (float): Hyperparameter of the l2 penalty. Defaults to 1.0.
      eta (float): Hyperparameter of the label dependence. Defaults to 1.0.
      augmentation (bool): Whether using covariates as augment features. Defaults to False.
      kernel_params (dict or None): Parameters for the kernel. Defaults to None.
  
  References:
      [1] Yan, K., Kou, L. and Zhang, D., 2018. Learning domain-invariant subspace using domain features and
          independence maximization. IEEE transactions on cybernetics, 48(1), pp.288-299.
docstr: Args:
      x : array-like. Input data, shape (n_samples, n_features)
      y : array-like. Labels, shape (nl_samples,)
      covariates : array-like. Domain co-variates, shape (n_samples, n_co-variates)
  
  Note:
      Unsupervised MIDA is performed if y is None.
      Semi-supervised MIDA is performed is y is not None.
docstr_tok: ["Args",":","x",":","array-like",".","Input","data",",","shape","(","n_samples",",","n_features",")","y",":","array-like",".","Labels",",","shape","(","nl_samples",",",")","covariates",":","array-like",".","Domain","co-variates",",","shape","(","n_samples",",","n_co-variates",")","Note",":","Unsupervised","MIDA","is","performed","if","y","is","None",".","Semi-supervised","MIDA","is","performed","is","y","is","not","None","."]
code: def fit(self, x, y=None, covariates=None):
      """
      Args:
          x : array-like. Input data, shape (n_samples, n_features)
          y : array-like. Labels, shape (nl_samples,)
          covariates : array-like. Domain co-variates, shape (n_samples, n_co-variates)
  
      Note:
          Unsupervised MIDA is performed if y is None.
          Semi-supervised MIDA is performed is y is not None.
      """
      if self.augmentation and isinstance(covariates, np.ndarray):
          x = np.concatenate((x, covariates), axis=1)
  
      # Kernel matrix
      kernel_x = self._get_kernel(x)
      kernel_x[np.isnan(kernel_x)] = 0
  
      # Solve the optimization problem
      self._fit(kernel_x, y, covariates)
      self.x_fit = x
  
      return self
  
imports: import logging
  import warnings
  import numpy
  from numpy.linalg import multi_dot
  from scipy import linalg
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.metrics.pairwise import pairwise_kernels
  from sklearn.preprocessing import KernelCenterer, LabelBinarizer
  from sklearn.utils.validation import check_is_fitted
  from tensorly.base import fold, unfold
  from tensorly.tenalg import multi_mode_dot
label_desc: Use image node_id 3 for calling the MIDA obj's underlying member method code with example usage: obj.fit(x, y, covariates) and returns: self