When we have multiple parameters θ0…...θnθ_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)})^2J(θ)=(1/2m)∑i=1m(hθ(x(i))−y(i))2
where θθθ is a vector.
Last updated 4 years ago
Was this helpful?