docstr: Node class for splitting
docstr_tok: ["Node","class","for","splitting"]
code: def __init__(
      self,
      feature: int = None,
      threshold: int = None,
      value=None,
      value_sklearn=None,
      idxs=None,
      is_root: bool = False,
      left=None,
      impurity: float = None,
      impurity_reduction: float = None,
      tree_num: int = None,
      node_id: int = None,
      right=None,
  ):
      """Node class for splitting"""
  
      # split or linear
      self.is_root = is_root
      self.idxs = idxs
      self.tree_num = tree_num
      self.node_id = None
      self.feature = feature
      self.impurity = impurity
      self.impurity_reduction = impurity_reduction
      self.value_sklearn = value_sklearn
  
      # different meanings
      self.value = (
          value  # for split this is mean, for linear this is weight
      )
  
      # split-specific
      self.threshold = threshold
      self.left = left
      self.right = right
      self.left_temp = None
      self.right_temp = None
  
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 Node object  with example: obj = Node(feature, threshold, value, value_sklearn, idxs, is_root, left, impurity, impurity_reduction, tree_num, node_id, right)