Cost Function

When we have multiple parameters θ0...θnθ_0…...θ_n, the cost function is given by:

J(θ)=(1/2m)i=1m(hθ(x(i))y(i))2J(θ) = (1/2m) ∑_{i=1}^{m}(h_θ(x^{(i)})−y^{(i)})^2

where θθ is a vector.

Last updated

Was this helpful?