my alpha parameter has no effect, and I cant figure out, what the problem is. My code:
%matplotlib notebook
def evaluation_plt(x, y, final_theta):
''' Plots the data x, y together with the final model
Args:
x: numpy arrays, x values from the data set
y: vector, y values from the data set
final_theta: numpy array
'''
#raise NotImplementedError("You should implement this!")
fig = plt.figure()
sub_plt = fig.add_subplot(111, projection="3d")
sub_plt.scatter(x[:,0],x[:,1],y,c=y,cmap='viridis')
X,Y = np.meshgrid(x,y)
Z = final_theta[0] + final_theta[1]*X + final_theta[2]*Y
sub_plt_data.plot_surface(X,Y,Z, alpha=0.5, cmap='inferno')
plt.show()
But the plot looks like this:
Plot
I did try to use inline plot but the problem is the perspective, its not good for the plot because you cant see anything because all the datapoints are in 1 line
New contributor
Skoofo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.