class_docstr: A class for feature importance methods.
class_docstr_tok: ["A","class","for","feature","importance","methods","."]
docstr: Calculate KL Divergence for binary classification.
  
  Args:
      pk (float): Probability of class 1 in treatment group
      qk (float): Probability of class 1 in control group
docstr_tok: ["Calculate","KL","Divergence","for","binary","classification",".","Args",":","pk","(","float",")",":","Probability","of","class","1","in","treatment","group","qk","(","float",")",":","Probability","of","class","1","in","control","group"]
code: def _kl_divergence(pk, qk):
      """
      Calculate KL Divergence for binary classification.
  
      Args:
          pk (float): Probability of class 1 in treatment group
          qk (float): Probability of class 1 in control group
      """
      if qk < 0.1**6:
          qk = 0.1**6
      elif qk > 1 - 0.1**6:
          qk = 1 - 0.1**6
      S = pk * np.log(pk / qk) + (1 - pk) * np.log((1 - pk) / (1 - qk))
      return S
  
imports: import numpy
  import pandas
  import statsmodels.api
  from scipy import stats
  from sklearn.impute import SimpleImputer
  import warnings
label_desc: Use image node_id 7 for calling the FilterSelect obj's underlying member method code with example usage: obj._kl_divergence(pk, qk) and returns: S