docstr: Test on a real (small) dataset
          
code: def test_integration_fitting(self):
      """Test on a real (small) dataset"""
      np.random.seed(13)
      feature_names = [
          "#Pregnant",
          "Glucose concentration test",
          "Blood pressure(mmHg)",
          "Triceps skin fold thickness(mm)",
          "2-Hour serum insulin (mu U/ml)",
          "Body mass index",
          "Diabetes pedigree function",
          "Age (years)",
      ]
  
      data = loadarff(
          os.path.join(path_to_tests, "test_data/diabetes.arff")
      )
      data_np = np.array(
          list(map(lambda x: np.array(list(x)), data[0]))
      )
      X, y_text = data_np[:, :-1].astype("float32"), data_np[
          :, -1
      ].astype("str")
      y = (y_text == "tested_positive").astype(int)  # labels 0-1
  
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, test_size=0.8
      )  # split
      disc = ExtraBasicDiscretizer(
          feature_names, n_bins=3, strategy="uniform"
      )
      X_train_disc = disc.fit_transform(
          pd.DataFrame(X_train, columns=feature_names)
      )
      X_test_disc = disc.transform(
          pd.DataFrame(X_test, columns=feature_names)
      )
  
      # train classifier (allow more iterations for better accuracy; use BigDataRuleListClassifier for large datasets)
      print("training...")
      model = BayesianRuleListClassifier(
          max_iter=300,
          minsupport=0.4,
          maxcardinality=1,
          class1label="diabetes",
          verbose=False,
      )
      model.fit(
          X_train_disc.values,
          y_train,
          feature_names=X_train_disc.columns,
      )
      preds = model.predict(X_test_disc.values, threshold=0.1)
      print(
          "RuleListClassifier Accuracy:",
          np.mean(y_test == preds),
          "Learned interpretable model:\n",
          model,
      )
  
file_path: imodels/tests/brl_test.py
imports: import os
  import unittest
  import numpy
  import pandas
  from scipy.io.arff import loadarff
  from sklearn.model_selection import train_test_split
  from imodels.rule_list.bayesian_rule_list.bayesian_rule_list import BayesianRuleListClassifier
  from imodels.discretization import ExtraBasicDiscretizer
label_desc: Use image node_id 2 for calling the TestBRL obj's underlying member method code with example usage: obj.test_integration_fitting() without return types