(self, tree_param: DecisionTreeParam, data_bin=None, bin_split_points: np.array = None,
                 bin_sparse_point=None, g_h=None, valid_feature: dict = None, epoch_idx: int = None,
                 role: str = None, tree_idx: int = None, flow_id: int = None, mode='train')
Parameters
        ----------
        tree_param: decision tree parameter object
        data_bin binned: data instance
        bin_split_points: data split points
        bin_sparse_point: sparse data point
        g_h computed: g val and h val of instances
        valid_feature: dict points out valid features {valid:true,invalid:false}
        epoch_idx: current epoch index
        role: host or guest
        flow_id: flow id
        mode: train / predict
Parameters
        ----------
        tree_param: decision tree parameter object
        data_bin binned: data instance
        bin_split_points: data split points
        bin_sparse_point: sparse data point
        g_h computed: g val and h val of instances
        valid_feature: dict points out valid features {valid:true,invalid:false}
        epoch_idx: current epoch index
        role: host or guest
        flow_id: flow id
        mode: train / predict
Parameters ---------- tree_param : decision tree parameter object data_bin binned : data instance bin_split_points : data split points bin_sparse_point : sparse data point g_h computed : g val and h val of instances valid_feature : dict points out valid features { valid : true invalid : false } epoch_idx : current epoch index role : host or guest flow_id : flow id mode : train / predict
def __init__(self, tree_param: DecisionTreeParam, data_bin=None, bin_split_points: np.array = None,
                 bin_sparse_point=None, g_h=None, valid_feature: dict = None, epoch_idx: int = None,
                 role: str = None, tree_idx: int = None, flow_id: int = None, mode='train'):

        """
        Parameters
        ----------
        tree_param: decision tree parameter object
        data_bin binned: data instance
        bin_split_points: data split points
        bin_sparse_point: sparse data point
        g_h computed: g val and h val of instances
        valid_feature: dict points out valid features {valid:true,invalid:false}
        epoch_idx: current epoch index
        role: host or guest
        flow_id: flow id
        mode: train / predict
        """

        super(HomoDecisionTreeClient, self).__init__(tree_param)
        self.splitter = Splitter(self.criterion_method, self.criterion_params, self.min_impurity_split,
                                 self.min_sample_split, self.min_leaf_node)
        self.data_bin = data_bin
        self.g_h = g_h
        self.bin_split_points = bin_split_points
        self.bin_sparse_points = bin_sparse_point
        self.epoch_idx = epoch_idx
        self.tree_idx = tree_idx
        self.transfer_inst = HomoDecisionTreeTransferVariable()

        """
        initializing here
        """
        self.valid_features = valid_feature
        self.tree_node = []  # start from root node
        self.tree_node_num = 0
        self.cur_layer_node = []
        self.runtime_idx = 0
        self.sitename = consts.GUEST

        # memory backend
        self.arr_bin_data = None
        self.memory_hist_builder = None
        self.sample_id_arr = None
        self.bin_num = 0

        # secure aggregator, class SecureBoostClientAggregator
        if mode == 'train':
            self.role = role
            self.set_flowid(flow_id)
            self.aggregator = DecisionTreeClientAggregator(verbose=False)

        elif mode == 'predict':
            self.role, self.aggregator = None, None

        self.check_max_split_nodes()

        LOGGER.debug('use missing status {} {}'.format(self.use_missing, self.zero_as_missing))
def __init__ ( self , tree_param : DecisionTreeParam , data_bin = None , bin_split_points : np . array = None , bin_sparse_point = None , g_h = None , valid_feature : dict = None , epoch_idx : int = None , role : str = None , tree_idx : int = None , flow_id : int = None , mode = 'train' ) : super ( HomoDecisionTreeClient , self ) . __init__ ( tree_param ) self . splitter = Splitter ( self . criterion_method , self . criterion_params , self . min_impurity_split , self . min_sample_split , self . min_leaf_node ) self . data_bin = data_bin self . g_h = g_h self . bin_split_points = bin_split_points self . bin_sparse_points = bin_sparse_point self . epoch_idx = epoch_idx self . tree_idx = tree_idx self . transfer_inst = HomoDecisionTreeTransferVariable ( ) """
        initializing here
        """ self . valid_features = valid_feature self . tree_node = [ ] # start from root node self . tree_node_num = 0 self . cur_layer_node = [ ] self . runtime_idx = 0 self . sitename = consts . GUEST # memory backend self . arr_bin_data = None self . memory_hist_builder = None self . sample_id_arr = None self . bin_num = 0 # secure aggregator, class SecureBoostClientAggregator if mode == 'train' : self . role = role self . set_flowid ( flow_id ) self . aggregator = DecisionTreeClientAggregator ( verbose = False ) elif mode == 'predict' : self . role , self . aggregator = None , None self . check_max_split_nodes ( ) LOGGER . debug ( 'use missing status {} {}' . format ( self . use_missing , self . zero_as_missing ) )