code: def test_lime_tabular_explainer_not_equal_random_state(self):
      X, y = make_classification(
          n_samples=1000,
          n_features=20,
          n_informative=2,
          n_redundant=2,
          random_state=10,
      )
  
      rf = RandomForestClassifier(n_estimators=500, random_state=10)
      rf.fit(X, y)
      instance = np.random.RandomState(10).randint(0, X.shape[0])
      feature_names = ["feature" + str(i) for i in range(20)]
  
      # ----------------------------------------------------------------------
      # -------------------------Quartile Discretizer-------------------------
      # ----------------------------------------------------------------------
  
      # ---------------------------------[1]----------------------------------
      discretizer = QuartileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = QuartileDiscretizer(
          X, [], feature_names, y, random_state=10
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[2]----------------------------------
      discretizer = QuartileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = QuartileDiscretizer(
          X, [], feature_names, y, random_state=10
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[3]----------------------------------
      discretizer = QuartileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = QuartileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[4]----------------------------------
      discretizer = QuartileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = QuartileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertFalse(exp_1.as_map() != exp_2.as_map())
  
      # ----------------------------------------------------------------------
      # --------------------------Decile Discretizer--------------------------
      # ----------------------------------------------------------------------
  
      # ---------------------------------[1]----------------------------------
      discretizer = DecileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = DecileDiscretizer(
          X, [], feature_names, y, random_state=10
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[2]----------------------------------
      discretizer = DecileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = DecileDiscretizer(
          X, [], feature_names, y, random_state=10
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[3]----------------------------------
      discretizer = DecileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = DecileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[4]----------------------------------
      discretizer = DecileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = DecileDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertFalse(exp_1.as_map() != exp_2.as_map())
  
      # ----------------------------------------------------------------------
      # --------------------------Entropy Discretizer-------------------------
      # ----------------------------------------------------------------------
  
      # ---------------------------------[1]----------------------------------
      discretizer = EntropyDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = EntropyDiscretizer(
          X, [], feature_names, y, random_state=10
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[2]----------------------------------
      discretizer = EntropyDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = EntropyDiscretizer(
          X, [], feature_names, y, random_state=10
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[3]----------------------------------
      discretizer = EntropyDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = EntropyDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=10,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertTrue(exp_1.as_map() != exp_2.as_map())
  
      # ---------------------------------[4]----------------------------------
      discretizer = EntropyDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_1 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_1 = explainer_1.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      discretizer = EntropyDiscretizer(
          X, [], feature_names, y, random_state=20
      )
      explainer_2 = LimeTabularExplainer(
          X,
          feature_names=feature_names,
          discretize_continuous=True,
          discretizer=discretizer,
          random_state=20,
      )
      exp_2 = explainer_2.explain_instance(
          X[instance], rf.predict_proba, num_samples=500
      )
  
      self.assertFalse(exp_1.as_map() != exp_2.as_map())
  
imports: import unittest
  import numpy
  import collections
  import sklearn
  import sklearn.datasets
  import sklearn.ensemble
  import sklearn.linear_model
  from numpy.testing import assert_array_equal
  from sklearn.datasets import load_iris, make_classification, make_multilabel_classification
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.linear_model import LinearRegression
  from lime.discretize import QuartileDiscretizer, DecileDiscretizer, EntropyDiscretizer
  from lime.lime_tabular import LimeTabularExplainer
label_desc: Use image node_id 8 for calling the TestLimeTabular obj's underlying member method code with example usage: obj.test_lime_tabular_explainer_not_equal_random_state() without return types