@staticmethod
    def defaultLeafValueFun(yDim):
        def tr(values, activeIndices):
            selectedValues = OnDemandSelectedVector(values.iloc[:, yDim], activeIndices)

            sz = len(selectedValues)

            if sz == 0:
                return float("nan")

            return sum(selectedValues) / float(sz)

        return tr
dataset/ETHPy150Open ufora/ufora/packages/python/pyfora/algorithms/regressionTrees/RegressionTree.py/RegressionTreeBuilder.defaultLeafValueFun/original