def solve(self, theta=None):
        if theta is None:
            oldTheta = numpy.zeros(self.nFeatures)
        else:
            oldTheta = theta

        newTheta = self.updateTheta(oldTheta)

        iters = 1
        while iters < self.maxIters and \
              sum((newTheta - oldTheta) ** 2) > self.tol * self.tol:
            oldTheta = newTheta
            newTheta = self.updateTheta(oldTheta)
            iters = iters + 1

        return ReturnValue(newTheta, iters)
dataset/ETHPy150Open ufora/ufora/packages/python/pyfora/algorithms/logistic/FullRankMajorizationSolver.py/FullRankMajorizationSolver.solve/original