docstr: Initialize a DecisionTree instance.
  
  Parameters:
  -----------
  max_depth : int
      The maximum depth of the tree.
  use_missing : bool, optional
      Whether or not to use missing values (default is False).
  zero_as_missing : bool, optional
      Whether to treat zero as a missing value (default is False).
  valid_features: list of boolean, optional
      Valid features for training, default is None, which means all features are valid.
docstr_tok: ["Initialize","a","DecisionTree","instance",".","Parameters",":","--","--","--","--","--","-","max_depth",":","int","The","maximum","depth","of","the","tree",".","use_missing",":","bool",",","optional","Whether","or","not","to","use","missing","values","(","default","is","False",")",".","zero_as_missing",":","bool",",","optional","Whether","to","treat","zero","as","a","missing","value","(","default","is","False",")",".","valid_features",":","list","of","boolean",",","optional","Valid","features","for","training",",","default","is","None",",","which","means","all","features","are","valid","."]
code: def __init__(
      self,
      max_depth=3,
      use_missing=False,
      zero_as_missing=False,
      valid_features=None,
  ):
      """
      Initialize a DecisionTree instance.
  
      Parameters:
      -----------
      max_depth : int
          The maximum depth of the tree.
      use_missing : bool, optional
          Whether or not to use missing values (default is False).
      zero_as_missing : bool, optional
          Whether to treat zero as a missing value (default is False).
      valid_features: list of boolean, optional
          Valid features for training, default is None, which means all features are valid.
      """
      self.max_depth = max_depth
      self.use_missing = use_missing
      self.zero_as_missing = zero_as_missing
  
      # runtime variables
      self._nodes = []
      self._cur_layer_node = []
      self._cur_leaf_idx = -1
      self._feature_importance = {}
      self._predict_weights = None
      self._g_tensor, self._h_tensor = None, None
      self._sample_pos = None
      self._leaf_node_map = {}
      self._valid_feature = valid_features
      self._sample_on_leaves = None
      self._sample_weights = None
      self._splitter = None
  
imports: import numpy
  import pandas
  from fate.arch import Context
  from fate.arch.dataframe import DataFrame
  from fate.ml.ensemble.learner.decision_tree.tree_core.splitter import SplitInfo
  from typing import List
  import logging
label_desc: Use image node_id 1 to create a new DecisionTree object from inherited base classes: object with example: obj = DecisionTree(max_depth, use_missing, zero_as_missing, valid_features)