def update_gaussian_hyperparameters_indep(self, param, data, settings):
        n_points = float(self.n_points[self.root])
        self.prior_mean, self.prior_variance = self.get_node_mean_and_variance(self.root)
        self.prior_precision = 1.0 / self.prior_variance
        self.cumulative_split_costs = {}
        self.leaf_means = []
        self.leaf_variances = []
        node_means = []
        d_node_means = {self.root: self.prior_mean}
        node_parent_means = []
        node_split_times = []
        node_parent_split_times = []
        if self.root.is_leaf:
            self.cumulative_split_costs[self.root] = 0.
            remaining = []
            self.max_split_time = 0.1   # NOTE: initial value, need to specify non-zero value
        else:
            self.cumulative_split_costs[self.root] = self.max_split_costs[self.root]
            remaining = [self.root.left, self.root.right]
            self.max_split_time = self.cumulative_split_costs[self.root] + 0
            node_split_times.append(self.cumulative_split_costs[self.root])
            node_parent_split_times.append(0.)
            node_means.append(self.prior_mean)
            node_parent_means.append(self.prior_mean)
        while True:
            try:
                node_id = remaining.pop(0)
            except __HOLE__:
                break
            self.cumulative_split_costs[node_id] = self.cumulative_split_costs[node_id.parent] \
                                                    + self.max_split_costs[node_id]
            node_mean, node_variance = self.get_node_mean_and_variance(node_id)
            node_split_times.append(self.cumulative_split_costs[node_id])
            node_parent_split_times.append(self.cumulative_split_costs[node_id.parent])
            node_means.append(node_mean)
            node_parent_means.append(d_node_means[node_id.parent])
            d_node_means[node_id] = node_mean
            if not node_id.is_leaf:
                remaining.append(node_id.left)
                remaining.append(node_id.right)
                self.max_split_time = max(self.max_split_time, self.cumulative_split_costs[node_id])
            else:
                self.leaf_means.append(node_mean)
                self.leaf_variances.append(node_variance)
        #self.noise_variance = np.max(self.leaf_variances)
        self.noise_variance = np.mean(self.leaf_variances)
        self.noise_precision = 1.0 / self.noise_variance
        self.sigmoid_coef = 3. / self.max_split_time
        #self.sigmoid_coef = data['n_dim']
        #self.sigmoid_coef = data['n_dim'] / 5
        #self.sigmoid_coef = data['n_dim']  / (2. * np.log2(n_points))
        #self.sigmoid_coef = data['n_dim']  / (2. * np.log2(n_points))
        #self.sigmoid_coef = data['n_dim']  / (n_points)
        #self.variance_leaf_from_root = 2 * np.mean((np.array(self.leaf_means) - self.prior_mean) ** 2)
        # set sd to 3 times the empirical sd so that leaf node means are highly plausible (avoid too much smoothing)
        #self.variance_coef = 1.0 * self.variance_leaf_from_root     
        if self.root.is_leaf:
            self.variance_coef = 1.0
        else:
            node_means = np.array(node_means)
            node_parent_means = np.array(node_parent_means)
            node_split_times = np.array(node_split_times)
            node_parent_split_times = np.array(node_parent_split_times)
            tmp_den = sigmoid(self.sigmoid_coef * node_split_times) \
                        - sigmoid(self.sigmoid_coef * node_parent_split_times)
            tmp_num = (node_means - node_parent_means) ** 2
            variance_coef_est = np.mean(tmp_num / tmp_den)
            self.variance_coef = variance_coef_est
            print 'sigmoid_coef = %.3f, variance_coef = %.3f' % (self.sigmoid_coef, variance_coef_est)
dataset/ETHPy150Open balajiln/mondrianforest/src/mondrianforest.py/MondrianTree.update_gaussian_hyperparameters_indep