class_docstr: FIGS (sum of trees) classifier.
  Fast Interpretable Greedy-Tree Sums (FIGS) is an algorithm for fitting concise rule-based models.
  Specifically, FIGS generalizes CART to simultaneously grow a flexible number of trees in a summation.
  The total number of splits across all the trees can be restricted by a pre-specified threshold, keeping the model interpretable.
  Experiments across real-world datasets show that FIGS achieves state-of-the-art prediction performance when restricted to just a few splits (e.g. less than 20).
  https://arxiv.org/abs/2201.11931
class_docstr_tok: ["FIGS","(","sum","of","trees",")","classifier",".","Fast","Interpretable","Greedy-Tree","Sums","(","FIGS",")","is","an","algorithm","for","fitting","concise","rule-based","models",".","Specifically",",","FIGS","generalizes","CART","to","simultaneously","grow","a","flexible","number","of","trees","in","a","summation",".","The","total","number","of","splits","across","all","the","trees","can","be","restricted","by","a","pre-specified","threshold",",","keeping","the","model","interpretable",".","Experiments","across","real-world","datasets","show","that","FIGS","achieves","state-of-the-art","prediction","performance","when","restricted","to","just","a","few","splits","(","e.g",".","less","than","20",")",".","https",":","\/\/arxiv.org\/abs\/2201.11931"]
docstr: Params
  ------
  max_rules: int
      Max total number of rules across all trees
  max_trees: int
      Max total number of trees
  min_impurity_decrease: float
      A node will be split if this split induces a decrease of the impurity greater than or equal to this value.
  max_features
      The number of features to consider when looking for the best split (see https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html)
docstr_tok: ["Params","--","--","--","max_rules",":","int","Max","total","number","of","rules","across","all","trees","max_trees",":","int","Max","total","number","of","trees","min_impurity_decrease",":","float","A","node","will","be","split","if","this","split","induces","a","decrease","of","the","impurity","greater","than","or","equal","to","this","value",".","max_features","The","number","of","features","to","consider","when","looking","for","the","best","split","(","see","https",":","\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.ensemble.RandomForestClassifier.html",")"]
code: def __init__(
      self,
      max_rules: int = 12,
      max_trees: int = None,
      min_impurity_decrease: float = 0.0,
      random_state=None,
      max_features: str = None,
  ):
      """
      Params
      ------
      max_rules: int
          Max total number of rules across all trees
      max_trees: int
          Max total number of trees
      min_impurity_decrease: float
          A node will be split if this split induces a decrease of the impurity greater than or equal to this value.
      max_features
          The number of features to consider when looking for the best split (see https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html)
      """
      super().__init__()
      self.max_rules = max_rules
      self.max_trees = max_trees
      self.min_impurity_decrease = min_impurity_decrease
      self.random_state = random_state
      self.max_features = max_features
      self._init_decision_function()
  
imports: from copy import deepcopy
  from typing import List
  import matplotlib.pyplot
  import numpy
  import pandas
  from scipy.special import expit
  from sklearn import datasets
  from sklearn import tree
  from sklearn.base import BaseEstimator, ClassifierMixin, RegressorMixin
  from sklearn.model_selection import train_test_split, cross_val_score
  from sklearn.tree import plot_tree, DecisionTreeClassifier
  from sklearn.utils import check_X_y, check_array
  from sklearn.utils.validation import _check_sample_weight, check_is_fitted
  from imodels.tree.viz_utils import extract_sklearn_tree_from_figs
  from imodels.util.arguments import check_fit_arguments
  from imodels.util.data_util import encode_categories
label_desc: Use image node_id 1 to create a new FIGS object from inherited base classes: BaseEstimator with example: obj = FIGS(max_rules, max_trees, min_impurity_decrease, random_state, max_features)