In [3]:
%matplotlib inline
import os
print os.getcwd()
try:
from andrew_exercises.mlex1 import ex1_multi as ex
except:
import ex1_multi as ex
from matplotlib.pyplot import *
from mpl_toolkits.mplot3d import axes3d, Axes3D
from matplotlib import cm
import itertools
feats, y, theta = ex.load_data()
ex.plot_data(feats, y)
X, mu, sigma = ex.normalize_features(feats)
theta_opt, J_history, theta_hist = ex.run_gradient_descent(X, y, theta)
ex.predict_house_sample(theta_opt, mu, sigma)
ex.plot_cost_convergence(J_history)
ex.plot_hipothesys_fit(feats, X, theta_opt)
show()