I tried fitting an OLS for Boston data set. My graph looks like below.
How to annotate the linear regression equation just above the line or somewhere in the graph? How do I print the equation in Python?
I am fairly new to this area. Exploring python as of now. If somebody can help me, it would speed up my learning curve.
I tried this as well.
My problem is - how to annotate the above in the graph in equation format?
You can use coefficients of linear fit to make a legend like in this example:
If you use more complex fitting function you can use latex notification: https://matplotlib.org/users/usetex.html