def __init__(self, data=None, train_ids=None, settings=None, param=None, cache=None):
        if data is None:
            return
        root_node = MondrianBlock(data, settings, settings.budget_to_use, None, \
                        get_data_range(data, train_ids))
        self.root = root_node
        self.non_leaf_nodes = []
        self.leaf_nodes = []
        self.node_info = {}
        self.max_split_costs = {}
        self.split_times = {}
        self.train_ids = {root_node: train_ids}
        self.copy_params(param, settings)
        init_prediction_tree(self, settings)
        if cache:
            if settings.optype == 'class':
                self.counts = {root_node: cache['y_train_counts']}
            else:
                self.sum_y = {root_node: cache['sum_y']}
                self.sum_y2 = {root_node: cache['sum_y2']}
                self.n_points = {root_node: cache['n_points']}
            if settings.bagging == 1 or settings.n_minibatches > 1:
                init_update_posterior_node_incremental(self, data, param, settings, cache, root_node, train_ids)
        self.grow_nodes = [root_node]
        self.grow(data, settings, param, cache)
initialize Mondrian tree data structure and sample restriction of Mondrian tree to current training data
dataset/ETHPy150Open balajiln/mondrianforest/src/mondrianforest.py/MondrianTree.__init__