Friday 29 December 2017

Linear Regression

Linear regression is supposed to be the starting point of machine learning, it is the algorithm that most people start with and it is really easy to understand and super easy to implement in python. I won't go into details on the theory but in the most basic sense you plot points on a graph using known data and then extrapolate a prediction from it. 

So in my example I have some running data, I have a group of results for runners over a flat 5k route and a set of results over a hilly 3k route and I want to predict how fast any person is going to run the 3k route based on their 5k data. Very simple as I have one input variable against which I am going to make the prediction. The code below has comments showing how this is done with python.... 

Some helpful links here and here

The code:


No comments:

Post a Comment