def fit_(self,
             df,
             yDim,
             maxDepth=None,
             xDimensions=None,
             leafValueFun=None,
             activeIndices=None):
        if maxDepth is None:
            maxDepth = self.maxDepth

        if xDimensions is None:
            xDimensions = [ix for ix in xrange(df.shape[1]) if ix != yDim]

        if leafValueFun is None:
            leafValueFun = RegressionTreeBuilder.defaultLeafValueFun(yDim)

        if activeIndices is None:
            activeIndices = range(len(df))

        if self.minSamplesSplit < len(activeIndices) or maxDepth == 0:
            leafValue = leafValueFun(df, activeIndices)
            return RegressionTree(
                [RegressionLeafRule(
                    leafValue
                    )],
                len(xDimensions)
                )

        bestRule = self.bestRule(df, yDim, xDimensions, activeIndices)

        leftIndices, rightIndices = bestRule.splitDataframe(df, activeIndices)

        if len(leftIndices) == 0 or len(rightIndices) == 0:
            return RegressionTree(
                [RegressionLeafRule(
                    leafValueFun(df, activeIndices)
                    )],
                len(xDimensions)
                )

        nextDepth = maxDepth - 1
        treeLeft = self.fit_(
            df, yDim, nextDepth,
            xDimensions,
            leafValueFun,
            leftIndices
            )
        treeRight = self.fit_(
            df, yDim, nextDepth,
            xDimensions,
            leafValueFun,
            rightIndices
            )

        treeLeft = treeLeft.rules
        treeRight = treeRight.rules

        leafValue = (len(leftIndices) * treeLeft[0].leafValue + \
                     len(rightIndices) * treeRight[0].leafValue) / \
            (len(leftIndices) + len(rightIndices))

        return RegressionTree(
            [Base.SplitRule(
                bestRule,
                1,
                1 + len(treeLeft),
                leafValue
                )] + treeLeft + treeRight,
            len(xDimensions)
            )
dataset/ETHPy150Open ufora/ufora/packages/python/pyfora/algorithms/regressionTrees/RegressionTree.py/RegressionTreeBuilder.fit_/swapped operands of `<`