October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following are the steps to draw a surface plot:
fig = plt.figure(figsize=(10,8))ax = fig.gca(projection='3d')
# Read Loss, theta0 and theta1 valuesLoss = pd.read_excel('Loss.xlsx')theta0_vals = pd.read_excel('theta0.xlsx')theta1_vals = pd.read_excel('theta1.xlsx')
X, Y = np.meshgrid(theta0_vals, theta1_vals)
# Plot surface graphsurf = ax.plot_surface(X, Y, Loss, cmap='plasma')
fig.colorbar(surf, shrink=0.5, aspect=5)
ax.set_xlabel('theta0')ax.set_ylabel('theta1') ...Read now
Unlock full access