docstr: Get 'no information' values from the training data.
  
  Parameters
  ----------
  train_data
      Representative sample from the training data.
  no_info_type
      Median or mean value by feature supported.
docstr_tok: ["Get","'no","information","'","values","from","the","training","data",".","Parameters","--","--","--","--","--","train_data","Representative","sample","from","the","training","data",".","no_info_type","Median","or","mean","value","by","feature","supported","."]
code: def fit(
      self, train_data: np.ndarray, no_info_type: str = "median"
  ) -> "CEM":
      """
      Get 'no information' values from the training data.
  
      Parameters
      ----------
      train_data
          Representative sample from the training data.
      no_info_type
          Median or mean value by feature supported.
      """
      # TODO: find equal distance area in distribution to different classes as "no info" area
      if self.no_info_val is not None:
          logger.warning(
              '"no_info_type" variable already defined. Previous values will be overwritten.'
          )
  
      # reshape train data
      train_flat = train_data.reshape((train_data.shape[0], -1))
  
      # calculate no info values by feature and reshape to original shape
      if no_info_type == "median":
          self.no_info_val = np.median(train_flat, axis=0).reshape(
              self.shape
          )
      elif no_info_type == "mean":
          self.no_info_val = np.mean(train_flat, axis=0).reshape(
              self.shape
          )
  
      # update metadata
      self.meta["params"].update(no_info_type=no_info_type)
  
      return self
  
file_path: alibi/alibi/explainers/cem.py
imports: import copy
  import logging
  import sys
  from typing import Any, Callable, Optional, Tuple, Union
  import numpy
  import tensorflow.compat.v1
  from alibi.api.defaults import DEFAULT_DATA_CEM, DEFAULT_META_CEM
  from alibi.api.interfaces import Explainer, Explanation, FitMixin
label_desc: Use image node_id 2 for calling the CEM obj's underlying member method code with example usage: obj.fit(train_data, no_info_type) and returns: self