Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Does crazy shit. Before changing, really think through
- # the Linear Algebra and make sure the matrix operations
- # work correctly.
- for n in range(num_iters):
- diff = hypothesis(X, theta) - y
- theta = theat - alpha / float(m_examples) * diff[np.newaxis,:].dot(X) # Computes the derivative of the compute_cost function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement