class_docstr: Class Feature Interpreter.
  
  The class is used to generate the following information:
      - feature distribution
      - feature correlation
      - feature importance ranking for a trained model
docstr: Get feature distribution analysis based on feature types
  
  Args:
      feature_types: list, a list of pre-defined data type for feature
      train_x: numpy.ndarray, training data of which each row is a training sample.
               A training data set with M samples of each of which has N features should have a shape (M,N).
      labels: list,
  
  Returns:
      A dictionary maps each feature name to the stats object based on its data type.
      For stats class implement, details can be found in `xai.data.explorer`.
docstr_tok: ["Get","feature","distribution","analysis","based","on","feature","types","Args",":","feature_types",":","list",",","a","list","of","pre-defined","data","type","for","feature","train_x",":","numpy.ndarray",",","training","data","of","which","each","row","is","a","training","sample",".","A","training","data","set","with","M","samples","of","each","of","which","has","N","features","should","have","a","shape","(","M",",","N",")",".","labels",":","list",",","Returns",":","A","dictionary","maps","each","feature","name","to","the","stats","object","based","on","its","data","type",".","For","stats","class","implement",",","details","can","be","found","in","`","xai.data.explorer","`","."]
code: def get_feature_distribution(
      self,
      feature_types: List[str],
      train_x: numpy.ndarray,
      labels: List = None,
  ) -> Dict:
      """
      Get feature distribution analysis based on feature types
  
      Args:
          feature_types: list, a list of pre-defined data type for feature
          train_x: numpy.ndarray, training data of which each row is a training sample.
                   A training data set with M samples of each of which has N features should have a shape (M,N).
          labels: list,
  
      Returns:
          A dictionary maps each feature name to the stats object based on its data type.
          For stats class implement, details can be found in `xai.data.explorer`.
  
      """
      if len(feature_types) != len(self._feature_names):
          raise InconsistentSize(
              "feature_types",
              "feature_names",
              len(feature_types),
              len(self._feature_names),
          )
  
      data_analyzer_suite = DataAnalyzerSuite(
          data_type_list=feature_types, column_names=self._feature_names
      )
      if train_x.shape[1] != len(feature_types):
          raise InconsistentSize(
              "train_x.shape[1]",
              "feature_types",
              train_x.shape[1],
              len(feature_types),
          )
  
      for col_idx, column in enumerate(self._feature_names):
          data_analyzer_suite.feed_column(
              column_name=column,
              column_data=numpy.transpose(train_x[:, col_idx]).tolist(),
              labels=labels,
          )
      return data_analyzer_suite.get_statistics()
  
imports: import operator
  import warnings
  import numpy
  import pandas
  from scipy import stats
  from typing import List, Dict, Tuple
  import shap
  from xai import ALG, MODE
  from xai.data.constants import DATATYPE
  from xai.data.explorer.data_analyzer_suite import DataAnalyzerSuite
  from xai.model.interpreter.exceptions import InconsistentSize, TrainingDataNotProvided
  from xai.model.interpreter.exceptions import UnsupportedMethodType
label_desc: Use image node_id 2 for calling the FeatureInterpreter obj's underlying member method code with example usage: obj.get_feature_distribution(feature_types, train_x, labels) and returns: data_analyzer_suite