In [2]:
%matplotlib inline
import os
print os.getcwd()
try:
from andrew_exercises.mlex1 import ex1 as ex
except:
import ex1 as ex
from matplotlib.pyplot import *
from mpl_toolkits.mplot3d import axes3d, Axes3D
from matplotlib import cm
import itertools
X, y, theta = ex.load_data()
ex.plot_data(X, y)
theta_opt, J_history, theta_hist = ex.run_gradient_descent(X, y, theta)
ex.plot_cost_convergence(J_history)
ex.plot_hipothesys_fit(X, theta_opt)
ex.plot_3d_cost(X, y, theta_hist, J_history)
In [ ]: