def update_tree_leaf(self, leaf, indices_in_leaf, X, y, y_pred, sample_weight, update_mask, residual):
        leaf_ans = y[indices_in_leaf]
        leaf_exp = sample_weight[indices_in_leaf] * numpy.exp(
            - self.y_signed[indices_in_leaf] * y_pred[indices_in_leaf])
        w1 = numpy.sum(leaf_exp[leaf_ans == 1])
        w2 = numpy.sum(leaf_exp[leaf_ans == 0])
        # regularization
        w_reg = (w1 + w2) * self.regularization
        # minimization of w1 * e^(-x) + w2 * e^x
        return 0.5 * numpy.log((w2 + w_reg) / (w1 + w_reg))
dataset/ETHPy150Open anaderi/lhcb_trigger_ml/hep_ml/losses.py/AdaLossFunction.update_tree_leaf/swapped operands of `/`