I can't figure out what's preventing me from getting a contour plot of this cost function. After much trial and error, I'm getting:
ValueError: zero-size array to reduction operation minimum which has no identity
If I print J it doesn't give me any values, just a 100x100 array full of nan. Is that the reason? J should be full of cost values, right? Thanks so much for any help.
X,y,ComputeCost = defined earlier and 90% sure not the problem
theta_zero = np.linspace(-10,10,100)
theta_one = np.linspace(-1,4,100)
L,Q = np.meshgrid(theta_zero,theta_one)
J = np.zeros((len(theta_zero),len(theta_one)))
for i in range(0,len(theta_zero)):
for j in range(0,len(theta_one)):
t = DataFrame([theta_zero[i],theta_one[j]])
J[i,j] = ComputeCost(X,y,t)
plt.contour(L,Q,J)