def bestRuleForXDimension(self, df, yDim, xDim, activeIndices):
        xColumn = OnDemandSelectedVector(df.iloc[:, xDim], activeIndices)
        yColumn = OnDemandSelectedVector(df.iloc[:, yDim], activeIndices)

        xColumnSampleSummary = RegressionTreeBuilder.sampleSummary(xColumn)

        bucketedSampleSummaries = self.computeBucketedSampleSummaries(
            xColumn,
            yColumn,
            xColumnSampleSummary.stdev * 3.0 - xColumnSampleSummary.mean,
            xColumnSampleSummary.mean + xColumnSampleSummary.stdev * 3.0,
            self.numBuckets
            )

        splitPoint, impurityImprovement = \
            bucketedSampleSummaries.bestSplitPointAndImpurityImprovement()

        return Base.Rule(
            xDim,
            splitPoint,
            impurityImprovement,
            len(activeIndices)
            )
dataset/ETHPy150Open ufora/ufora/packages/python/pyfora/algorithms/regressionTrees/RegressionTree.py/RegressionTreeBuilder.bestRuleForXDimension/swapped operands of `-`