Machine-Learning
Machine-Learning copied to clipboard
It would be a good idea to put all the plots in a subplot
https://github.com/animesh-agarwal/Machine-Learning/blob/5b2d8a71984016ae021094641a3815d6ea9ac527/LinearRegression/main.py#L49
When it plots the separate plot. The second plot could only be seen if the first one is closed and the third one could be seen if the second one is closed. Its important to see all the plots at once to understand. Also another important aspect is please plot the regression line on top of scatter plot rather alone. It would make a lot of sense.
Change Plots.py such that the ply.show() is done in a separate procedure call, say show_plots.
Then, change the main program to do this:
from plots import scatter_plot, plot, ploty, show_plots
.....
.....
# plotting
scatter_plot(x, y)
plot(x, predicted_values)
show_plots()
ploty(cost_function, 'no of iterations', 'cost function')
show_plots()