Linear Regression Workshop at IIT-Bombay
This is the code for the "How to Do Linear Regression" workshop session by Jalaj Thanaki at IIT-Bombay.
Overview
- Find the dataset from here
- Find the Code in form of Jupyter Notebook from here
- Find the images from here.
Data
I'm using a very small dataset of student test scores and the amount of hours they studied. Intuitively, we know that there must be a relationship right? The more you study, the better your test scores should be. We're going to use linear regression to prove this relationship.
Dependencies
We need two dependencies
- numpy
- Jupyter Notebook
Installation of dependencies
-
numpy
For Pythton 2 $ pip install numpy For Python 3 $ pip3 install numpy
-
Jupyter Notebook
For Pythton 2 $ pip install jupyter For Python 3 $ pip3 install jupyter
Python 2 and 3 both work for this. Use pip to install any dependencies.
Usage
I have used Python 2 but if you want to use Python 3 then just choose Python3 when you will run code on Jupyter Notebook. As well as change syntax of print command.
Credits
Credits for this code go to mattnedrich and Siraj Raval. I've merely created a wrapper to get people started.