Intro to Machine Learning: Linear Regression using Tensorflow

Programming Linear Regression using Tensorflow

Posted on July 5, 2017

Hello Everyone !!

Thanks for continuing with this post.

In the last post, we discussed about the code and working of Linear Regression using Scikit-Learn, the theory and the mathematics behind it.

In this post, we will start writing the code for Linear Regression using Tensorflow. So, let's get started.

You can find the Python code file and the IPython notebook for this tutorial here.

Linear Regression using Tensorflow:

Some quick notes before we leave this topic:

  1. We have seen the working of Linear Regression in detail.
  2. We went over the basic mathematics and terminologies like slope, bias etc.
  3. We saw the working of Linear Regression using R-Squred method but that gave us the hard coded values of slope and bias so we moved on to Gradient Descent to find those values.

  4. Using Gradient Descent, we tried to minimize the Cost Function and get the best values for slope and bias.
  5. Lastly, we went over the use of Linear Regression using Scikit-Learn and Tensorflow. We saw that how easy it is to define a model and work with it.
  6. To improve the accuracy further, we could use a much bigger dataset with more number of features and do feature selection using certain methods. But since, this was an introductory post, so I tried to keep it simple.

Now that we have covered Linear Regression using Tensorflow, let's move to our next Machine Learning Algorithm, i.e. Logistic Regression.

Great work on completing this tutorial, let's move to the next tutorial in series, Introduction to Machine Learning: Logistic Regression

For more projects and code, follow me on Github

Please feel free to leave any comments, suggestions, corrections if any, below.

comments powered by Disqus