def computeMuSum(self, thetaDotX):
        # we could also stash these values in a vector, since they're common
        # to all columns. which is better?
        def rowWiseScalarMultiplier(ix):
            return 1.0 / (1.0 + math.exp(-thetaDotX[ix]))

        columns = self.X.columns()
        def computeWeightedColumnSum(columnIx):
            column = columns[columnIx]
            return sum(
                rowWiseScalarMultiplier(ix) * column[ix] \
                for ix in xrange(self.X.shape[0])
                )

        return numpy.array([
            computeWeightedColumnSum(columnIx) for \
            columnIx in xrange(self.X.shape[1])
            ])
dataset/ETHPy150Open ufora/ufora/packages/python/pyfora/algorithms/logistic/FullRankMajorizationSolver.py/FullRankMajorizationSolver.computeMuSum/original