code: def test_fit_and_transform_exceptions(self):
      # >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>
      # fit() requires y. The error is raised at 'self.decisionTree.fit(X, y)'
      # >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>
  
      fbt = FeatureBinarizerFromTrees()
      with self.assertRaises((TypeError, ValueError)):
          fbt.fit(self.X_train)
  
      # >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>
      # fit() does not allow/support NaN/None
      # >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>
  
      fbt = FeatureBinarizerFromTrees()
      Xn = self.X_train.copy(True)
      Xn.iloc[
          [31, 27, 80], Xn.columns.get_loc("smoothness error")
      ] = np.NaN
      with self.assertRaises(ValueError):
          fbt.fit(Xn, self.y_train)
  
      fbt = FeatureBinarizerFromTrees()
      Xn = self.X_train.copy(True)
      Xn.iloc[[3, 17, 20], Xn.columns.get_loc("bin num")] = np.NaN
      with self.assertRaises(ValueError):
          fbt.fit(Xn, self.y_train)
  
      fbt = FeatureBinarizerFromTrees(colCateg=self.col_categorical)
      Xn = self.X_train.copy(True)
      Xn.iloc[[3, 17, 20], Xn.columns.get_loc("cat num")] = np.NaN
      with self.assertRaises(ValueError):
          fbt.fit(Xn, self.y_train)
  
file_path: AIX360/tests/rbm/test_Feature_Binarizer_From_Trees.py
imports: from unittest import TestCase
  import numpy
  from numpy import ndarray
  from pandas import DataFrame
  from sklearn.datasets import load_breast_cancer
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import OneHotEncoder, StandardScaler
  from aix360.algorithms.rbm import FeatureBinarizerFromTrees
label_desc: Use image node_id 3 for calling the TestFeatureBinarizerFromTrees obj's underlying member method code with example usage: obj.test_fit_and_transform_exceptions() without return types