class_docstr: Reference:
  
  [1] Blackwell, Matthew. "A selection bias approach to sensitivity analysis
  for causal effects." Political Analysis 22.2 (2014): 169-182.
  https://www.mattblackwell.org/files/papers/causalsens.pdf
  
  [2] Confouding parameter alpha_range using the same range as in:
  https://github.com/mattblackwell/causalsens/blob/master/R/causalsens.R
code: def causalsens(self):
      alpha_range = self.alpha_range
      confound = self.confound
      df = self.df
      X = df[self.inference_features].values
      p = df[self.p_col].values
      treatment = df[self.treatment_col].values
      y = df[self.outcome_col].values
  
      preds = self.get_prediction(X, p, treatment, y)
  
      sens_df = pd.DataFrame()
  
      sens = []
      for a in alpha_range:
          adj = confound(a, p, treatment)
          preds_adj = y - adj
          s_preds = self.get_prediction(X, p, treatment, preds_adj)
          ate, ate_lb, ate_ub = self.get_ate_ci(
              X, p, treatment, preds_adj
          )
  
          s_preds_residul = preds_adj - s_preds
          rsqs = a**2 * np.var(treatment) / np.var(s_preds_residul)
  
          sens.append([a, rsqs, ate, ate_lb, ate_ub])
  
      sens_df = pd.DataFrame(
          sens,
          columns=[
              "alpha",
              "rsqs",
              "New ATE",
              "New ATE LB",
              "New ATE UB",
          ],
      )
  
      rss = np.sum(np.square(y - preds))
      partial_rsqs = []
      for feature in self.sensitivity_features:
          df_new = df.copy()
          X_new = (
              df_new[self.inference_features]
              .drop(feature, axis=1)
              .copy()
          )
          y_new_preds = self.get_prediction(X_new, p, treatment, y)
          rss_new = np.sum(np.square(y - y_new_preds))
          partial_rsqs.append(((rss_new - rss) / rss))
  
      partial_rsqs_df = pd.DataFrame(
          [self.sensitivity_features, partial_rsqs]
      ).T
      partial_rsqs_df.columns = ["feature", "partial_rsqs"]
  
      return sens_df, partial_rsqs_df
  
imports: import logging
  import numpy
  import pandas
  from collections import defaultdict
  import matplotlib.pyplot
  from importlib import import_module
label_desc: Use image node_id 2 for calling the SensitivitySelectionBias obj's underlying member method code with example usage: obj.causalsens() and returns: sens_df,  partial_rsqs_df