class_docstr: Bayesian or-of-and algorithm.
  Generates patterns that satisfy the minimum support and maximum length and then select the Nrules rules that have the highest entropy.
  In function SA_patternbased, each local maximum is stored in maps and the best BOA is returned.
  Remember here the BOA contains only the index of selected rules from Nrules self.rules_
class_docstr_tok: ["Bayesian","or-of-and","algorithm",".","Generates","patterns","that","satisfy","the","minimum","support","and","maximum","length","and","then","select","the","Nrules","rules","that","have","the","highest","entropy",".","In","function","SA_patternbased",",","each","local","maximum","is","stored","in","maps","and","the","best","BOA","is","returned",".","Remember","here","the","BOA","contains","only","the","index","of","selected","rules","from","Nrules","self.rules_"]
code: def _compute_prob(self, rules, y):
      Yhat = (np.sum(self.RMatrix[:, rules], axis=1) > 0).astype(int)
      TP, FP, TN, FN = _get_confusion_matrix(Yhat, y)
      Kn_count = list(
          np.bincount(
              [self.rules_len_list[x] for x in rules],
              minlength=self.maxlen + 1,
          )
      )
      prior_ChsRules = sum(
          [
              _log_betabin(
                  Kn_count[i],
                  self.pattern_space[i],
                  self.alpha_l[i],
                  self.beta_l[i],
              )
              for i in range(1, len(Kn_count), 1)
          ]
      )
      likelihood_1 = _log_betabin(
          TP, TP + FP, self.alpha_pos, self.beta_pos
      )
      likelihood_2 = _log_betabin(
          TN, FN + TN, self.alpha_neg, self.beta_neg
      )
      return [TP, FP, TN, FN], [
          prior_ChsRules,
          likelihood_1,
          likelihood_2,
      ]
  
imports: import itertools
  import operator
  import os
  import warnings
  from os.path import join
  from bisect import bisect_left
  from collections import defaultdict
  from copy import deepcopy
  from itertools import combinations
  from random import sample
  import numpy
  import pandas
  from mlxtend.frequent_patterns import fpgrowth
  from numpy.random import random
  from pandas import read_csv
  from scipy.sparse import csc_matrix
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.utils.multiclass import check_classification_targets
  from sklearn.utils.validation import check_X_y, check_is_fitted
  from imodels.rule_set.rule_set import RuleSet
  from imodels.util.arguments import check_fit_arguments
label_desc: Use image node_id 10 for calling the BayesianRuleSetClassifier obj's underlying member method code with example usage: obj._compute_prob(rules, y) and returns: list,  list