class_docstr: Ruleset estimator based on Boolean Rules with Column Generation.
  
  Operates according to an scikit-learn interface with a few additional methods.
class_docstr_tok: ["Ruleset","estimator","based","on","Boolean","Rules","with","Column","Generation",".","Operates","according","to","an","scikit-learn","interface","with","a","few","additional","methods","."]
docstr: Initializes the estimator.
  
  `**kwargs` are passed to OverlapBooleanRule (see ./BCS/overlap_boolean_rule.py for description of arguments)
  
  :param n_ref_multiplier: Reference sample count multiplier, only used for estimating support, defaults to 1.0,
      but should be set to zero for Overlap rules
  :type n_ref_multiplier: float, optional
  :param lambda0: Regularization on the # of rules, defaults to 0.0
  :type lambda0: float, optional
  :param lambda1: Regularization on the # of literals, defaults to 0.0
  :type lambda1: float, optional
  :param cat_cols: Set of categorical columns, defaults to None
  :type cat_cols: Optional[List], optional
  :param negations: Include negation of literals, defaults to True
  :type negations: bool, optional
  :param num_thresh: Number of bins to discretize continuous variables, defaults to 9 (for deciles)
  :type num_thresh: int, optional
  :param seed: Random seed for reference samples, only used for estimating support, defaults to None
  :type seed: int, optional
  :param ref_range: Manual override of the range for reference samples, given as a dictionary of the form
      `ref_range = {c: {"is_binary": True/False, "min": min_value, "max": max_value}}`
  :type ref_range: Optional[Dict], optional
  :param thresh_override: Manual override of the thresholds for continuous features, given as a dictionary like
      the following, will only be applied to continuous features with more than num_thresh unique values
      `thresh_override = {column_name: np.linspace(0, 100, 10)}`
  :type thresh_override: Optional[Dict], optional
docstr_tok: ["Initializes","the","estimator",".","`","*","*","kwargs","`","are","passed","to","OverlapBooleanRule","(","see",".\/BCS\/overlap_boolean_rule.py","for","description","of","arguments",")",":","param","n_ref_multiplier",":","Reference","sample","count","multiplier",",","only","used","for","estimating","support",",","defaults","to","1.0",",","but","should","be","set","to","zero","for","Overlap","rules",":","type","n_ref_multiplier",":","float",",","optional",":","param","lambda0",":","Regularization","on","the","#","of","rules",",","defaults","to","0.0",":","type","lambda0",":","float",",","optional",":","param","lambda1",":","Regularization","on","the","#","of","literals",",","defaults","to","0.0",":","type","lambda1",":","float",",","optional",":","param","cat_cols",":","Set","of","categorical","columns",",","defaults","to","None",":","type","cat_cols",":","Optional","[","List","]",",","optional",":","param","negations",":","Include","negation","of","literals",",","defaults","to","True",":","type","negations",":","bool",",","optional",":","param","num_thresh",":","Number","of","bins","to","discretize","continuous","variables",",","defaults","to","9","(","for","deciles",")",":","type","num_thresh",":","int",",","optional",":","param","seed",":","Random","seed","for","reference","samples",",","only","used","for","estimating","support",",","defaults","to","None",":","type","seed",":","int",",","optional",":","param","ref_range",":","Manual","override","of","the","range","for","reference","samples",",","given","as","a","dictionary","of","the","form","`","ref_range","=","{","c",":","{","``","is_binary","''",":","True\/False",",","``","min","''",":","min_value",",","``","max","''",":","max_value","}","}","`",":","type","ref_range",":","Optional","[","Dict","]",",","optional",":","param","thresh_override",":","Manual","override","of","the","thresholds","for","continuous","features",",","given","as","a","dictionary","like","the","following",",","will","only","be","applied","to","continuous","features","with","more","than","num_thresh","unique","values","`","thresh_override","=","{","column_name",":","np.linspace","(","0",",","100",",","10",")","}","`",":","type","thresh_override",":","Optional","[","Dict","]",",","optional"]
code: def __init__(
      self,
      n_ref_multiplier: float = 1.0,
      lambda0: float = 0.0,
      lambda1: float = 0.0,
      cat_cols: Optional[List] = None,
      negations: bool = True,
      num_thresh: int = 9,
      seed: int = None,
      ref_range: Optional[Dict[str, Dict]] = None,
      thresh_override: Optional[Dict] = None,
      **kwargs,
  ):
      """
      Initializes the estimator.
  
      `**kwargs` are passed to OverlapBooleanRule (see ./BCS/overlap_boolean_rule.py for description of arguments)
  
      :param n_ref_multiplier: Reference sample count multiplier, only used for estimating support, defaults to 1.0,
          but should be set to zero for Overlap rules
      :type n_ref_multiplier: float, optional
      :param lambda0: Regularization on the # of rules, defaults to 0.0
      :type lambda0: float, optional
      :param lambda1: Regularization on the # of literals, defaults to 0.0
      :type lambda1: float, optional
      :param cat_cols: Set of categorical columns, defaults to None
      :type cat_cols: Optional[List], optional
      :param negations: Include negation of literals, defaults to True
      :type negations: bool, optional
      :param num_thresh: Number of bins to discretize continuous variables, defaults to 9 (for deciles)
      :type num_thresh: int, optional
      :param seed: Random seed for reference samples, only used for estimating support, defaults to None
      :type seed: int, optional
      :param ref_range: Manual override of the range for reference samples, given as a dictionary of the form
          `ref_range = {c: {"is_binary": True/False, "min": min_value, "max": max_value}}`
      :type ref_range: Optional[Dict], optional
      :param thresh_override: Manual override of the thresholds for continuous features, given as a dictionary like
          the following, will only be applied to continuous features with more than num_thresh unique values
          `thresh_override = {column_name: np.linspace(0, 100, 10)}`
      :type thresh_override: Optional[Dict], optional
      """
      # Parameters
      self.n_ref_multiplier = n_ref_multiplier
      self.lambda0 = lambda0
      self.lambda1 = lambda1
      self.cat_cols = cat_cols if cat_cols else []
      self.negations = negations
      self.num_thresh = num_thresh
      self.seed = seed
      self.ref_range = ref_range
      self.thresh_override = thresh_override
      self.kwargs = kwargs
  
      # Bookkeeping
      self.refSamples = None
      self.overlapSamples = None
  
      # Initialize estimators
      self.init_estimator_()
  
      self.valid_params = [
          "lambda0",
          "lambda1",
          "cat_cols",
          "n_ref_multiplier",
          "negations",
          "num_thresh",
          "seed",
      ]
  
file_path: dowhy/dowhy/causal_refuters/overrule/ruleset.py
imports: from typing import Callable, Dict, List, Optional
  import numpy
  import pandas
  from .BCS.load_process_data_BCS import FeatureBinarizer
  from .BCS.overlap_boolean_rule import OverlapBooleanRule
  from .utils import rule_str, sample_reference
label_desc: Use image node_id 1 to create a new BCSRulesetEstimator object  with example: obj = BCSRulesetEstimator(n_ref_multiplier, lambda0, lambda1, cat_cols, negations, num_thresh, seed, ref_range, thresh_override)