cost_f = []
while abs(theta1_guess - theta1_last) > variance or abs(theta0_guess -
    theta0_last) > variance:
    theta1_last = theta1_guess
theta0_last = theta0_guess
hypothesis = create_hypothesis(theta1_guess, theta0_guess)
cost_f.append(1.0 / (2 * m) * sum([pow(hypothesis(point[0]) - point[1], 2) for
    point in data]))
theta0_guess = theta0_guess - learning_rate * (1.0 / m) * sum([(hypothesis(
    point[0]) - point[1]) for point in data])
theta1_guess = theta1_guess - learning_rate * (1.0 / m) * sum([((hypothesis
    (point[0]) - point[1]) * point[0]) for point in data])
How to determine the learning rate and the variance in a gradient descent algorithm？