docstr: Cross-validation is used to select the best regularization parameter for hierarchical shrinkage.
  
   Params
  ------
  estimator_
      Sklearn estimator (already initialized).
      If no estimator_ is passed, sklearn decision tree is used
  
  max_rules
      If estimator is None, then max_leaf_nodes is passed to the default decision tree
  
  args, kwargs
      Note: args, kwargs are not used but left so that imodels-experiments can still pass redundant args.
docstr_tok: ["Cross-validation","is","used","to","select","the","best","regularization","parameter","for","hierarchical","shrinkage",".","Params","--","--","--","estimator_","Sklearn","estimator","(","already","initialized",")",".","If","no","estimator_","is","passed",",","sklearn","decision","tree","is","used","max_rules","If","estimator","is","None",",","then","max_leaf_nodes","is","passed","to","the","default","decision","tree","args",",","kwargs","Note",":","args",",","kwargs","are","not","used","but","left","so","that","imodels-experiments","can","still","pass","redundant","args","."]
code: def __init__(
      self,
      estimator_: BaseEstimator = None,
      reg_param_list: List[float] = [0, 0.1, 1, 10, 50, 100, 500],
      shrinkage_scheme_: str = "node_based",
      max_leaf_nodes: int = 20,
      cv: int = 3,
      scoring=None,
      *args,
      **kwargs,
  ):
      """Cross-validation is used to select the best regularization parameter for hierarchical shrinkage.
  
       Params
      ------
      estimator_
          Sklearn estimator (already initialized).
          If no estimator_ is passed, sklearn decision tree is used
  
      max_rules
          If estimator is None, then max_leaf_nodes is passed to the default decision tree
  
      args, kwargs
          Note: args, kwargs are not used but left so that imodels-experiments can still pass redundant args.
      """
      if estimator_ is None:
          estimator_ = DecisionTreeClassifier(
              max_leaf_nodes=max_leaf_nodes
          )
      super().__init__(estimator_, reg_param=None)
      self.reg_param_list = np.array(reg_param_list)
      self.cv = cv
      self.scoring = scoring
      self.shrinkage_scheme_ = shrinkage_scheme_
  
imports: import time
  from copy import deepcopy
  from typing import List
  import numpy
  from sklearn import datasets
  from sklearn.base import BaseEstimator, RegressorMixin, ClassifierMixin
  from sklearn.metrics import r2_score, mean_squared_error, log_loss
  from sklearn.model_selection import cross_val_score, KFold
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier, export_text
  from sklearn.ensemble import GradientBoostingClassifier, GradientBoostingRegressor, RandomForestRegressor
  from imodels.util import checks
  from imodels.util.arguments import check_fit_arguments
  from imodels.util.tree import compute_tree_complexity
label_desc: Use image node_id 1 to create a new HSTreeClassifierCV object from inherited base classes: HSTreeClassifier with example: obj = HSTreeClassifierCV(estimator_, reg_param_list, shrinkage_scheme_, max_leaf_nodes, cv, scoring)